summaryrefslogtreecommitdiffstats
path: root/drivers/unix
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/file_access_unix.cpp2
-rw-r--r--drivers/unix/file_access_unix_pipe.cpp2
-rw-r--r--drivers/unix/os_unix.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index 3b3f96b136..79428900b6 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -120,7 +120,7 @@ Error FileAccessUnix::open_internal(const String &p_path, int p_mode_flags) {
last_error = ERR_FILE_CANT_OPEN;
return last_error;
}
- fchmod(fd, 0666);
+ fchmod(fd, 0644);
path = String::utf8(cs.ptr());
f = fdopen(fd, mode_string);
diff --git a/drivers/unix/file_access_unix_pipe.cpp b/drivers/unix/file_access_unix_pipe.cpp
index 592085ea7c..e12a53cb77 100644
--- a/drivers/unix/file_access_unix_pipe.cpp
+++ b/drivers/unix/file_access_unix_pipe.cpp
@@ -72,7 +72,7 @@ Error FileAccessUnixPipe::open_internal(const String &p_path, int p_mode_flags)
struct stat st = {};
int err = stat(path.utf8().get_data(), &st);
if (err) {
- if (mkfifo(path.utf8().get_data(), 0666) != 0) {
+ if (mkfifo(path.utf8().get_data(), 0600) != 0) {
last_error = ERR_FILE_CANT_OPEN;
return last_error;
}
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 440b78e0b7..75bccf048c 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -193,7 +193,7 @@ String OS_Unix::get_stdin_string(int64_t p_buffer_size) {
Vector<uint8_t> data;
data.resize(p_buffer_size);
if (fgets((char *)data.ptrw(), data.size(), stdin)) {
- return String::utf8((char *)data.ptr());
+ return String::utf8((char *)data.ptr()).replace("\r\n", "\n").rstrip("\n");
}
return String();
}