ソースを参照

Make LocalFileSystem dir() skip files removed in convert

Instead of having null elements in the array
Leonardo Jeanteur 1 年間 前
コミット
6e6a434e0e
1 ファイル変更5 行追加2 行削除
  1. 5 2
      hxd/fs/LocalFileSystem.hx

+ 5 - 2
hxd/fs/LocalFileSystem.hx

@@ -383,8 +383,11 @@ class LocalFileSystem implements FileSystem {
 			throw new NotFound(baseDir + path);
 		var files = sys.FileSystem.readDirectory(baseDir + path);
 		var r : Array<FileEntry> = [];
-		for(f in files)
-			r.push(open(path + "/" + f, false));
+		for(f in files) {
+			var entry = open(path + "/" + f, false);
+			if( entry != null )
+				r.push(entry);
+		}
 		return r;
 	}