浏览代码

flash fix

ncannasse 6 年之前
父节点
当前提交
c591b998c2
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      hxd/fs/LocalFileSystem.hx

+ 5 - 4
hxd/fs/LocalFileSystem.hx

@@ -552,10 +552,7 @@ class LocalFileSystem implements FileSystem {
 	}
 
 	public function dir( path : String ) : Array<FileEntry> {
-		#if flash
-		throw "Not Supported";
-		return null;
-		#end
+		#if sys
 		if( !sys.FileSystem.exists(baseDir + path) || !sys.FileSystem.isDirectory(baseDir + path) )
 			throw new NotFound(baseDir + path);
 		var files = sys.FileSystem.readDirectory(baseDir + path);
@@ -563,6 +560,10 @@ class LocalFileSystem implements FileSystem {
 		for(f in files)
 			r.push(new LocalEntry(this, f, path + "/" + f, baseDir + path + "/" + f));
 		return r;
+		#else
+		throw "Not Supported";
+		return null;
+		#end
 	}
 
 }