mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-02 19:44:00 -06:00
PresetUpdater: Fix of the fix
This commit is contained in:
parent
43e8fe32aa
commit
7426291e9f
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue