You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
[Unix] Fix temporary file permissions.
This commit is contained in:
@@ -108,6 +108,10 @@ Error FileAccessUnix::open_internal(const String &p_path, int p_mode_flags) {
|
|||||||
last_error = ERR_FILE_CANT_OPEN;
|
last_error = ERR_FILE_CANT_OPEN;
|
||||||
return last_error;
|
return last_error;
|
||||||
}
|
}
|
||||||
|
// Fix temporary file permissions (defaults to 0600 instead of 0666 & ~umask).
|
||||||
|
mode_t mask = umask(022);
|
||||||
|
umask(mask);
|
||||||
|
fchmod(fd, 0666 & ~mask);
|
||||||
path = String::utf8(cs.ptr());
|
path = String::utf8(cs.ptr());
|
||||||
|
|
||||||
f = fdopen(fd, mode_string);
|
f = fdopen(fd, mode_string);
|
||||||
|
|||||||
Reference in New Issue
Block a user