浏览代码

Adding try catch on FileView convert fail.

clementlandrin 11 月之前
父节点
当前提交
0021d03716
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      hide/view/FileView.hx

+ 5 - 1
hide/view/FileView.hx

@@ -25,7 +25,11 @@ class FileView extends hide.ui.View<{ path : String }> {
 				@:privateAccess e = new hxd.fs.LocalFileSystem.LocalEntry(fs, state.path.split("/").pop(), state.path, f);
 				@:privateAccess if( e.file == null ) e = null;
 
-				fs.convert.run(e);
+				try {
+					fs.convert.run(e);
+				} catch ( e : Dynamic ) {
+					return;
+				}
 
 				onFileChanged(!exists(fs));
 			}, { checkDelete : true, keepOnRebuild : true });