commit 5853ac8e48a066a084b77d210fd620ba24b405e0 parent 22aa1455a6081ace0e1b1c09435a447296f914bf Author: Arun <engineerarun@gmail.com> Date: Fri, 5 Apr 2024 23:31:08 +0530 Merge pull request #1864 from horrad/master Fix file creation on OpenBSD Diffstat:
| M | src/nnn.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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!");