Skip to content

Commit

Permalink
Merge pull request #663 from zanzaben/fix650_oschmod_access
Browse files Browse the repository at this point in the history
Fix #650, OS_chmod uses read or write access.
  • Loading branch information
astrogeco authored Dec 7, 2020
2 parents 962bd53 + 0ecfba4 commit 77300fd
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 77300fd

Please sign in to comment.