浏览代码

Merge pull request #287 from riccardobl/master

Fix for ZipLocator and path with the root slash
Kirill Vainer 10 年之前
父节点
当前提交
6312f1a813
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      jme3-core/src/plugins/java/com/jme3/asset/plugins/ZipLocator.java

+ 1 - 0
jme3-core/src/plugins/java/com/jme3/asset/plugins/ZipLocator.java

@@ -82,6 +82,7 @@ public class ZipLocator implements AssetLocator {
 
     public AssetInfo locate(AssetManager manager, AssetKey key) {
         String name = key.getName();
+        if(name.startsWith("/"))name=name.substring(1);
         ZipEntry entry = zipfile.getEntry(name);
         if (entry == null)
             return null;