- 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
This commit is contained in:
parent
15eeef7f65
commit
f7fdabf9a8
@ -104,12 +104,18 @@ public class ProjectAssetManager extends DesktopAssetManager {
|
||||
String prefix = getAssetFolderName();
|
||||
int idx = absolutePath.indexOf(prefix);
|
||||
if (idx == 0) {
|
||||
System.out.println("absolute/prefix:"+absolutePath+" / "+prefix);
|
||||
return absolutePath.substring(prefix.length() + 1);
|
||||
return stripFirstSlash(absolutePath.substring(prefix.length()));
|
||||
}
|
||||
return absolutePath;
|
||||
}
|
||||
|
||||
private String stripFirstSlash(String input) {
|
||||
if (input.startsWith("/")) {
|
||||
return input.substring(1);
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public AssetManager getManager() {
|
||||
return this;
|
||||
|
Loading…
x
Reference in New Issue
Block a user