summaryrefslogtreecommitdiffstats
path: root/drivers/unix
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-11-26 19:30:58 +0000
committerGitHub <noreply@github.com>2024-11-26 19:30:58 +0000
commitb06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e (patch)
tree79c2a4c34f2d888ff962d76edf474c518d1abdea /drivers/unix
parentc5b1645e60a59c0292c04bece3fdb0715a61afea (diff)
parente58e18261ea7ed3978146ef8d77a900be2601be3 (diff)
downloadredot-engine-b06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e.tar.gz
Merge pull request #885 from Spartan322/merge/d09d82d
Merge commit godotengine/godot@d09d82d
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();
}