mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
PresetUpdater: Fix of the fix
This commit is contained in:
@@ -440,7 +440,9 @@ void PresetUpdater::priv::copy_file(const fs::path &source, const fs::path &targ
|
|||||||
static const auto perms = fs::owner_read | fs::owner_write | fs::group_read | fs::others_read; // aka 644
|
static const auto perms = fs::owner_read | fs::owner_write | fs::group_read | fs::others_read; // aka 644
|
||||||
|
|
||||||
// Make sure the file has correct permission both before and after we copy over it
|
// Make sure the file has correct permission both before and after we copy over it
|
||||||
fs::permissions(target, perms);
|
if (fs::exists(target)) {
|
||||||
|
fs::permissions(target, perms);
|
||||||
|
}
|
||||||
fs::copy_file(source, target, fs::copy_option::overwrite_if_exists);
|
fs::copy_file(source, target, fs::copy_option::overwrite_if_exists);
|
||||||
fs::permissions(target, perms);
|
fs::permissions(target, perms);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user