mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
unix: Don't create world-writable files when safe save is enabled
When the "filesystem/on_save/safe_save_on_backup_then_rename" option is enabled files are created with 0666 permissions (-rw-rw-rw-) which is too loose. Use 0644 (-rw-r--r--) instead which is how the files would normally be created with the setting disabled and the system umask taken into account.
This commit is contained in:
parent
05d985496c
commit
f49c9d7cd1
1 changed files with 1 additions and 1 deletions
|
|
@ -97,7 +97,7 @@ Error FileAccessUnix::open_internal(const String &p_path, int p_mode_flags) {
|
|||
last_error = ERR_FILE_CANT_OPEN;
|
||||
return last_error;
|
||||
}
|
||||
fchmod(fd, 0666);
|
||||
fchmod(fd, 0644);
|
||||
path = String::utf8(cs.ptr());
|
||||
|
||||
f = fdopen(fd, mode_string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue