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

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

@@ -88,7 +88,6 @@ public class Global {
public static File PerformanceAnalyzerDirectory;
public static File DataBackUpsDirectory;
public static File PackagesDirectory;
public static File SapforPackagesDirectory;
//------------------------------------------------------------------
public static Visualiser visualiser = null;
public static Visualizer_2 visualizer_2 = null;
@@ -127,7 +126,6 @@ public class Global {
Utils.CheckDirectory(StsDirectory = Paths.get(Home, Sts).toFile());
Utils.CheckDirectory(TestsDirectory = Paths.get(Home, Tests).toFile());
Utils.CheckDirectory(PerformanceAnalyzerDirectory = Paths.get(Home, PerformanceAnalyzer).toFile());
Utils.CheckDirectory(SapforPackagesDirectory = Paths.get(Home, "SapforTasksPackages").toFile());
}
public static void CheckServerDirectories() {
Utils.CheckDirectory(ComponentsDirectory = Paths.get(Home, components).toFile());

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) {