fix столбы конфигурация сапфор

v++
This commit is contained in:
2025-02-16 22:37:26 +03:00
parent 77179789f5
commit 9c0ed53d52
9 changed files with 42 additions and 42 deletions

View File

@@ -32,7 +32,7 @@ public:
File makeFileFile = File(makeFilePath, this->makefile_text);
String tests = userWorkspace + "/projects";
String testPath = tests + "/" + test_id;
Utils::CopyDirectory(testPath, workspace);
Utils::CopyDirectory_L(testPath, workspace);
}
virtual String getLaunchScriptText() {
String modules = userWorkspace + "/modules";

View File

@@ -83,6 +83,25 @@ public:
//printf("cp -r '%s' return code = %d\n",src.getCharArray(),i);
#endif
}
static void CopyDirectory_L(const String& src, const String& dst) {
#if __cplusplus >= 201703L
std::filesystem::copy((src+ "/.").getCharArray(), dst.getCharArray(), std::filesystem::copy_options::recursive|std::filesystem::copy_options::directories_only);
std::string src_home = string(src.getCharArray());
std::string dst_home = string(dst.getCharArray());
for (const std::filesystem::directory_entry& dir_entry : std::filesystem::recursive_directory_iterator(src_home))
{
if (dir_entry.is_regular_file()){
std::string src_file = dir_entry.path().string();
std::string relative = src_file.substr(src_home.size(), src_file.size());
std::string dst_file = string(dst_home).append(relative);
std::filesystem::copy(src_file, dst_file, std::filesystem::copy_options::create_symlinks);
}
}
#else
String command = "cp -rs " + String::DQuotes(src + "/.") + " " + String::DQuotes(dst);
int i = system(command.getCharArray());
#endif
}
static time_t getAbsoluteTime() {
return time(NULL);

View File

@@ -1 +1 @@
6
10