- make AssetKey not flatten relative paths
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10205 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
4d4801bb93
commit
437d34636b
@ -152,9 +152,10 @@ public class AssetKey<T> implements Savable, Cloneable {
|
|||||||
if (string.length() == 0 || string.equals(".")) {
|
if (string.length() == 0 || string.equals(".")) {
|
||||||
//do nothing
|
//do nothing
|
||||||
} else if (string.equals("..")) {
|
} else if (string.equals("..")) {
|
||||||
if (list.size() > 0) {
|
if (list.size() > 0 && !list.getLast().equals("..")) {
|
||||||
list.removeLast();
|
list.removeLast();
|
||||||
} else {
|
} else {
|
||||||
|
list.add("..");
|
||||||
Logger.getLogger(AssetKey.class.getName()).log(Level.SEVERE, "Asset path is outside assetmanager root");
|
Logger.getLogger(AssetKey.class.getName()).log(Level.SEVERE, "Asset path is outside assetmanager root");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user