Selaa lähdekoodia

Adding try catch on FileView convert fail.

clementlandrin 11 kuukautta sitten
vanhempi
commit
0021d03716
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  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 e = new hxd.fs.LocalFileSystem.LocalEntry(fs, state.path.split("/").pop(), state.path, f);
 				@:privateAccess if( e.file == null ) e = null;
 				@:privateAccess if( e.file == null ) e = null;
 
 
-				fs.convert.run(e);
+				try {
+					fs.convert.run(e);
+				} catch ( e : Dynamic ) {
+					return;
+				}
 
 
 				onFileChanged(!exists(fs));
 				onFileChanged(!exists(fs));
 			}, { checkDelete : true, keepOnRebuild : true });
 			}, { checkDelete : true, keepOnRebuild : true });