소스 검색

fixes for directories

ncannasse 12 년 전
부모
커밋
9f3d0d1665
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      hxd/res/EmbedFileSystem.hx

+ 2 - 1
hxd/res/EmbedFileSystem.hx

@@ -16,6 +16,7 @@ private class EmbedEntry extends FileEntry {
 	#end
 	#end
 
 
 	function new(fs, name, relPath, data) {
 	function new(fs, name, relPath, data) {
+		this.fs = fs;
 		this.name = name;
 		this.name = name;
 		this.relPath = relPath;
 		this.relPath = relPath;
 		this.data = data;
 		this.data = data;
@@ -203,7 +204,7 @@ class EmbedFileSystem #if !macro implements FileSystem #end {
 	public function get( path : String ) {
 	public function get( path : String ) {
 		#if flash
 		#if flash
 		var f = open(path);
 		var f = open(path);
-		if( f == null )
+		if( f == null && !isDirectory(path) )
 			throw "File not found " + path;
 			throw "File not found " + path;
 		return new EmbedEntry(this, path.split("/").pop(), path, f);
 		return new EmbedEntry(this, path.split("/").pop(), path, f);
 		#else
 		#else