промежуточный. ликвидировал велосипед с копированием папок
This commit is contained in:
@@ -1036,25 +1036,5 @@ public class Utils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static void copyDirectory(File src, File dst) throws Exception {
|
||||
int code = Constants.Nan;
|
||||
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) {
|
||||
ex.printStackTrace();
|
||||
throw new PassException("Команда " + command + " завершилась с исключением.");
|
||||
}
|
||||
if (code != 0)
|
||||
throw new PassException("Команда " + command + " завершилась с кодом " + code);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user