From 0ecfba4585eebc41f2fc6f6287818be9ca6ab4dd Mon Sep 17 00:00:00 2001 From: Alex Campbell Date: Tue, 1 Dec 2020 10:34:57 -0500 Subject: [PATCH] fix #650 OS_chmod uses read or write access. --- src/os/portable/os-impl-posix-files.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/os/portable/os-impl-posix-files.c b/src/os/portable/os-impl-posix-files.c index ba59fcba0..9fe58401a 100644 --- a/src/os/portable/os-impl-posix-files.c +++ b/src/os/portable/os-impl-posix-files.c @@ -202,7 +202,11 @@ int32 OS_FileChmod_Impl(const char *local_path, uint32 access) fd = open(local_path, O_RDONLY, 0); if (fd < 0) { - return OS_ERROR; + fd = open(local_path, O_WRONLY, 0); + if (fd < 0) + { + return OS_ERROR; + } } /*