mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 16:59:04 +08:00
PresetUpdater: Fix of the fix
This commit is contained in:
parent
43e8fe32aa
commit
7426291e9f
@ -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
|
||||||
|
if (fs::exists(target)) {
|
||||||
fs::permissions(target, perms);
|
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…
x
Reference in New Issue
Block a user