ENH: support sub-directories under system profiles
when copy directory, will copy the sub-directory recursively Change-Id: Ib49cc38aaf889556b0b94f0e4d20451d3d4f03b2
This commit is contained in:
parent
3fecdd6e7d
commit
a73c504ea3
|
@ -85,6 +85,11 @@ void copy_directory_fix(const fs::path &source, const fs::path &target)
|
||||||
std::string name = dir_entry.path().filename().string();
|
std::string name = dir_entry.path().filename().string();
|
||||||
std::string target_file = target.string() + "/" + name;
|
std::string target_file = target.string() + "/" + name;
|
||||||
|
|
||||||
|
if (boost::filesystem::is_directory(dir_entry)) {
|
||||||
|
const auto target_path = target / name;
|
||||||
|
copy_directory_fix(dir_entry, target_path);
|
||||||
|
}
|
||||||
|
else {
|
||||||
//CopyFileResult cfr = Slic3r::GUI::copy_file_gui(source_file, target_file, error_message, false);
|
//CopyFileResult cfr = Slic3r::GUI::copy_file_gui(source_file, target_file, error_message, false);
|
||||||
CopyFileResult cfr = copy_file(source_file, target_file, error_message, false);
|
CopyFileResult cfr = copy_file(source_file, target_file, error_message, false);
|
||||||
if (cfr != CopyFileResult::SUCCESS) {
|
if (cfr != CopyFileResult::SUCCESS) {
|
||||||
|
@ -94,6 +99,7 @@ void copy_directory_fix(const fs::path &source, const fs::path &target)
|
||||||
source, target, error_message));
|
source, target, error_message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue