|
@@ -332,19 +332,14 @@ class FileConverter {
|
|
conv.srcBytes = content;
|
|
conv.srcBytes = content;
|
|
conv.originalFilename = e.name;
|
|
conv.originalFilename = e.name;
|
|
conv.params = params;
|
|
conv.params = params;
|
|
|
|
+ conv.hash = hash;
|
|
onConvert(conv);
|
|
onConvert(conv);
|
|
- var prev = hxd.System.allowTimeout;
|
|
|
|
- hxd.System.allowTimeout = false;
|
|
|
|
- conv.convert();
|
|
|
|
- if( prev ) hxd.System.timeoutTick();
|
|
|
|
- hxd.System.allowTimeout = prev;
|
|
|
|
|
|
+ executeConvert(conv);
|
|
|
|
+ conv.hash = null;
|
|
conv.srcPath = null;
|
|
conv.srcPath = null;
|
|
conv.dstPath = null;
|
|
conv.dstPath = null;
|
|
conv.srcBytes = null;
|
|
conv.srcBytes = null;
|
|
conv.originalFilename = null;
|
|
conv.originalFilename = null;
|
|
- #if !macro
|
|
|
|
- hxd.System.timeoutTick();
|
|
|
|
- #end
|
|
|
|
|
|
|
|
if( !sys.FileSystem.exists(fullOutPath) )
|
|
if( !sys.FileSystem.exists(fullOutPath) )
|
|
throw "Converted output file "+fullOutPath+" was not created";
|
|
throw "Converted output file "+fullOutPath+" was not created";
|
|
@@ -355,6 +350,14 @@ class FileConverter {
|
|
saveCache();
|
|
saveCache();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ dynamic function executeConvert( conv : Convert ) {
|
|
|
|
+ var prev = hxd.System.allowTimeout;
|
|
|
|
+ hxd.System.allowTimeout = false;
|
|
|
|
+ conv.convert();
|
|
|
|
+ if( prev ) hxd.System.timeoutTick();
|
|
|
|
+ hxd.System.allowTimeout = prev;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
#end
|
|
#end
|