This commit is contained in:
2023-11-25 13:41:57 +03:00
parent 094c3fda66
commit f0fd9335c4
2 changed files with 12 additions and 10 deletions

View File

@@ -600,4 +600,13 @@ public abstract class Sapfor extends OSDComponent {
Constants.out_file,
Constants.err_file);
}
public static File temp_copy = null;
public static File getTempCopy() throws Exception {
if (temp_copy == null || !temp_copy.exists()) {
temp_copy = Utils.getTempFileName("SAPFOR" + (Global.isWindows ? ".exe" : ""));
FileUtils.copyFile(Current.getSapfor().getFile(), temp_copy);
temp_copy.setExecutable(true);
}
return temp_copy;
}
}