Răsfoiți Sursa

Merge pull request #107 from jonongjs/res-ignore-dot-files

Ignore files/directories starting with . or _
Nicolas Cannasse 10 ani în urmă
părinte
comite
3e62f6f288
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      hxd/res/FileTree.hx

+ 3 - 3
hxd/res/FileTree.hx

@@ -250,9 +250,9 @@ class FileTree {
 			var fileName = f;
 			var field = null;
 			var ext = null;
+			if( f.charCodeAt(0) == ".".code || f.charCodeAt(0) == "_".code )
+				continue;
 			if( sys.FileSystem.isDirectory(path) ) {
-				if( f.charCodeAt(0) == ".".code || f.charCodeAt(0) == "_".code )
-					continue;
 				field = handleDir(f, relPath.length == 0 ? f : relPath+"/"+f, path);
 			} else {
 				var extParts = f.split(".");
@@ -386,4 +386,4 @@ class FileTree {
 		return new FileTree(dir).scan();
 	}
 
-}
+}