Skip to content

Commit

Permalink
fix #650 OS_chmod uses read or write access.
Browse files Browse the repository at this point in the history
  • Loading branch information
zanzaben committed Dec 1, 2020
1 parent 41e8b9d commit 0ecfba4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/os/portable/os-impl-posix-files.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

/*
Expand Down

0 comments on commit 0ecfba4

Please sign in to comment.