瀏覽代碼

Watch file : check if file exists (#598)

Tom SPIRA 6 年之前
父節點
當前提交
d8f20a8e18
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      hxd/fs/LocalFileSystem.hx

+ 3 - 0
hxd/fs/LocalFileSystem.hx

@@ -481,6 +481,9 @@ class LocalFileSystem implements FileSystem {
 			times = try haxe.Unserializer.run(hxd.File.getBytes(tmpDir + "times.dat").toString()) catch( e : Dynamic ) new Map<String,Int>();
 		}
 		var realFile = baseDir + path;
+		if( !hxd.File.exists(realFile) ) {
+			return;
+		}
 		var time = std.Math.floor(getFileTime(realFile) / 1000);
 		if( hxd.File.exists(tmpFile) && time == times.get(path) )
 			return;