- Change getRelativeAssetPath method to strip only slashes (Fixes issue 412)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8580 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 15eeef7f65
commit f7fdabf9a8
  1. 10
      sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java

@ -104,12 +104,18 @@ public class ProjectAssetManager extends DesktopAssetManager {
String prefix = getAssetFolderName(); String prefix = getAssetFolderName();
int idx = absolutePath.indexOf(prefix); int idx = absolutePath.indexOf(prefix);
if (idx == 0) { if (idx == 0) {
System.out.println("absolute/prefix:"+absolutePath+" / "+prefix); return stripFirstSlash(absolutePath.substring(prefix.length()));
return absolutePath.substring(prefix.length() + 1);
} }
return absolutePath; return absolutePath;
} }
private String stripFirstSlash(String input) {
if (input.startsWith("/")) {
return input.substring(1);
}
return input;
}
@Deprecated @Deprecated
public AssetManager getManager() { public AssetManager getManager() {
return this; return this;

Loading…
Cancel
Save