浏览代码

SDK:
- add only jar file entries when collecting files from classpath

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9834 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

nor..67 13 年之前
父节点
当前提交
f2d4a664ea
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java

+ 5 - 2
jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java

@@ -314,8 +314,9 @@ public class ProjectAssetManager extends DesktopAssetManager {
 
     /**
      * Collects files over the asset folder(s) and classpath
+     *
      * @param suffix
-     * @return 
+     * @return
      */
     private String[] collectFilesWithSuffix(String suffix) {
         ArrayList<String> list = new ArrayList<String>();
@@ -341,7 +342,9 @@ public class ProjectAssetManager extends DesktopAssetManager {
                 while (jarEntry.hasMoreElements()) {
                     FileObject jarEntryAsset = jarEntry.nextElement();
                     if (jarEntryAsset.getExt().equalsIgnoreCase(suffix)) {
-                        list.add(jarEntryAsset.getPath());
+                        if (!jarEntryAsset.getPath().startsWith("/")) {
+                            list.add(jarEntryAsset.getPath());
+                        }
                     }
                 }