summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun <engineerarun@gmail.com>2024-04-05 23:31:08 +0530
committerGitHub <noreply@github.com>2024-04-05 23:31:08 +0530
commit5853ac8e48a066a084b77d210fd620ba24b405e0 (patch)
tree9778f6651f531863f64fc4ca9cedfbd833ad407f
parent22aa1455a6081ace0e1b1c09435a447296f914bf (diff)
parent28d993a8e85651e6e8a61b410472febc6069ceb0 (diff)
Merge pull request #1864 from horrad/master
Fix file creation on OpenBSD
-rw-r--r--src/nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 416e0ca8..0fb74833 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4732,7 +4732,7 @@ next:
return FALSE;
}
} else {
- int fd = open(path, O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR); /* Forced create mode for files */
+ int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR); /* Forced create mode for files */
if (fd == -1 && errno != EEXIST) {
DPRINTF_S("open!");