mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
skip .stl/.png file when copying system profiles
This commit is contained in:
parent
38409359a8
commit
9f1d47117e
3 changed files with 25 additions and 4 deletions
|
@ -1509,7 +1509,7 @@ bool bbl_calc_md5(std::string &filename, std::string &md5_out)
|
|||
}
|
||||
|
||||
// SoftFever: copy directory recursively
|
||||
void copy_directory_recursively(const boost::filesystem::path &source, const boost::filesystem::path &target)
|
||||
void copy_directory_recursively(const boost::filesystem::path &source, const boost::filesystem::path &target, std::function<bool(const std::string)> filter)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << Slic3r::format("copy_directory_recursively %1% -> %2%", source, target);
|
||||
std::string error_message;
|
||||
|
@ -1528,6 +1528,8 @@ void copy_directory_recursively(const boost::filesystem::path &source, const boo
|
|||
copy_directory_recursively(dir_entry, target_path);
|
||||
}
|
||||
else {
|
||||
if(filter && filter(name))
|
||||
continue;
|
||||
CopyFileResult cfr = copy_file(source_file, target_file, error_message, false);
|
||||
if (cfr != CopyFileResult::SUCCESS) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Copying failed(" << cfr << "): " << error_message;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue