Баг. в нескольких местах неправильно определялось рабочее пространство визуализатора по умолчанию.

This commit is contained in:
2023-10-02 17:58:55 +03:00
parent 6271d6272a
commit 8df00d4969
5 changed files with 17 additions and 14 deletions

View File

@@ -673,8 +673,8 @@ public class Utils {
for (String ext : extensions) {
if (file_extension.equalsIgnoreCase(ext)) {
res.add(file);
// System.out.println(file.getAbsolutePath() + ":" + Utils.Brackets(file_extension));
// System.out.println("MATCH");
// System.out.println(file.getAbsolutePath() + ":" + Utils.Brackets(file_extension));
// System.out.println("MATCH");
}
}
}
@@ -1038,9 +1038,15 @@ public class Utils {
}
public static void copyDirectory(File src, File dst) throws Exception {
int code = Constants.Nan;
String command = "xcopy " +
Utils.DQuotes(src.getAbsolutePath()) + " " +
Utils.DQuotes(dst.getAbsolutePath()) + " /e";
String command =
Global.isWindows ?
("xcopy " +
Utils.DQuotes(src.getAbsolutePath()) + " " +
Utils.DQuotes(dst.getAbsolutePath()) + " /e")
:
("cp -r " + Utils.DQuotes(src.getAbsolutePath()) + " " +
Utils.DQuotes(dst.getAbsolutePath())
);
try {
code = Runtime.getRuntime().exec(command).waitFor();
} catch (Exception ex) {