символьные ссылки в планировщике
This commit is contained in:
@@ -83,7 +83,7 @@ public:
|
||||
void prepareWorkspace() override {
|
||||
String binary_src = parent->getWorkspace() + "/0";
|
||||
String binary_dst = workspace + "/" + binary_name;
|
||||
Utils::Copy(binary_src, binary_dst);
|
||||
Utils::Ln(binary_src, binary_dst);
|
||||
if (!usr_par.isEmpty()) {
|
||||
String parPath = String(id) + "/usr.par";
|
||||
File parFile = File(parPath, usr_par);
|
||||
|
||||
@@ -65,6 +65,15 @@ public:
|
||||
//printf("cp '%s' return code = %d\n",src.getCharArray(), i);
|
||||
#endif
|
||||
}
|
||||
static void Ln(const String& src, const String& dst) {
|
||||
#if __cplusplus >= 201703L
|
||||
std::filesystem::create_symlink(src.getCharArray(), dst.getCharArray());
|
||||
#else
|
||||
String command = "ln -s " + String::DQuotes(src) + " " + String::DQuotes(dst);
|
||||
int i = system(command.getCharArray());
|
||||
//printf("cp '%s' return code = %d\n",src.getCharArray(), i);
|
||||
#endif
|
||||
}
|
||||
static void CopyDirectory(const String& src, const String& dst) {
|
||||
#if __cplusplus >= 201703L
|
||||
std::filesystem::copy((src+ "/.").getCharArray(), dst.getCharArray(), std::filesystem::copy_options::recursive);
|
||||
|
||||
@@ -1 +1 @@
|
||||
5
|
||||
6
|
||||
Reference in New Issue
Block a user