Browse Source

Merge pull request #79866 from adamscott/fix-file-permissions-web

Fix file permissions for the web platform (affects every Unix-like platform)
Yuri Sizov 2 years ago
parent
commit
7bb732cc38
1 changed files with 1 additions and 4 deletions
  1. 1 4
      drivers/unix/file_access_unix.cpp

+ 1 - 4
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);