Browse Source

prevent timeout during convert

Nicolas Cannasse 1 năm trước cách đây
mục cha
commit
e8edab4f19
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      hxd/fs/FileConverter.hx

+ 4 - 0
hxd/fs/FileConverter.hx

@@ -326,7 +326,11 @@ class FileConverter {
 		conv.originalFilename = e.name;
 		conv.params = params;
 		onConvert(conv);
+		var prev = hxd.System.allowTimeout;
+		hxd.System.allowTimeout = false;
 		conv.convert();
+		if( prev ) hxd.System.timeoutTick();
+		hxd.System.allowTimeout = prev;
 		conv.srcPath = null;
 		conv.dstPath = null;
 		conv.srcBytes = null;