summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/source/fsys/fstat.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx
index 19f51a7e0b3a..bf1c6b788f41 100644
--- a/tools/source/fsys/fstat.cxx
+++ b/tools/source/fsys/fstat.cxx
@@ -108,9 +108,7 @@ sal_uIntPtr FileStat::SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO )
mode_t nMode;
if (bRO)
{
- nMode = aBuf.st_mode & ~S_IWUSR;
- nMode = aBuf.st_mode & ~S_IWGRP;
- nMode = aBuf.st_mode & ~S_IWOTH;
+ nMode = aBuf.st_mode & ~(S_IWUSR | S_IWGRP | S_IWOTH);
}
else
nMode = aBuf.st_mode | S_IWUSR;