浏览代码

prevent timeout during convert

Nicolas Cannasse 1 年之前
父节点
当前提交
e8edab4f19
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      hxd/fs/FileConverter.hx

+ 4 - 0
hxd/fs/FileConverter.hx

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