summaryrefslogtreecommitdiffstats
path: root/drivers/unix/file_access_unix.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-07-25 21:26:30 +0200
committerYuri Sizov <yuris@humnom.net>2023-07-25 21:26:30 +0200
commit7bb732cc38b98641dff60556f107e72e76afb219 (patch)
tree417857e973d6ee99a7ae8d5e1f7558f132b3b4f1 /drivers/unix/file_access_unix.cpp
parent3f2e901633d570af16c3116bd127785e5f30f066 (diff)
parentb6faccccd57e0bd130b2fb6ac5708a34e23439cb (diff)
downloadredot-engine-7bb732cc38b98641dff60556f107e72e76afb219.tar.gz
Merge pull request #79866 from adamscott/fix-file-permissions-web
Fix file permissions for the web platform (affects every Unix-like platform)
Diffstat (limited to 'drivers/unix/file_access_unix.cpp')
-rw-r--r--drivers/unix/file_access_unix.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index 45f9f14dab..a80b7d449e 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -108,10 +108,7 @@ Error FileAccessUnix::open_internal(const String &p_path, int p_mode_flags) {
last_error = ERR_FILE_CANT_OPEN;
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);
+ fchmod(fd, 0666);
path = String::utf8(cs.ptr());
f = fdopen(fd, mode_string);