summaryrefslogtreecommitdiffstats
path: root/drivers/unix
diff options
context:
space:
mode:
authorAdam Scott <ascott.ca@gmail.com>2023-07-24 20:02:06 -0400
committerAdam Scott <ascott.ca@gmail.com>2023-07-25 08:29:24 -0400
commitb6faccccd57e0bd130b2fb6ac5708a34e23439cb (patch)
treefbe711265eadd5d7d9841c8f1013f3112b6c5684 /drivers/unix
parentf6187014ec1d7a47b7201f64f3a8376a5da2f42d (diff)
downloadredot-engine-b6faccccd57e0bd130b2fb6ac5708a34e23439cb.tar.gz
Fix file permissions for the web platform
Diffstat (limited to 'drivers/unix')
-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);