From 4f592550593ba9ac49f391739eb3e71341694691 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Mon, 24 Jul 2023 20:02:06 -0400 Subject: [PATCH] Fix file permissions for the web platform (cherry picked from commit b6faccccd57e0bd130b2fb6ac5708a34e23439cb) --- drivers/unix/file_access_unix.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 45f9f14dab2..a80b7d449e6 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);