Skip to content

Commit

Permalink
Fix file permissions for the web platform
Browse files Browse the repository at this point in the history
  • Loading branch information
adamscott committed Jul 25, 2023
1 parent f618701 commit b6faccc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/unix/file_access_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b6faccc

Please sign in to comment.