mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-04-12 21:25:04 -05:00
Improve copyFile
This commit is contained in:
@@ -64,10 +64,12 @@ namespace linuxdeploy {
|
||||
|
||||
if (!overwrite && bf::exists(to)) {
|
||||
ldLog() << LD_DEBUG << "File exists, skipping:" << to << std::endl;
|
||||
} else {
|
||||
bf::copy_file(from, to, bf::copy_option::overwrite_if_exists);
|
||||
return true;
|
||||
}
|
||||
|
||||
bf::copy_file(from, to, bf::copy_option::overwrite_if_exists);
|
||||
} catch (const bf::filesystem_error& e) {
|
||||
ldLog() << LD_ERROR << "Failed to copy file " << from << "to" << to << LD_NO_SPACE << ":" << e.what() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user