mirror of
https://github.com/godotengine/godot
synced 2024-09-15 22:10:09 +00:00
Merge pull request #79866 from adamscott/fix-file-permissions-web
Fix file permissions for the web platform (affects every Unix-like platform)
This commit is contained in:
commit
7bb732cc38
|
@ -108,10 +108,7 @@ 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).
|
fchmod(fd, 0666);
|
||||||
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);
|
||||||
|
|
Loading…
Reference in a new issue