summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2009-08-11 16:11:35 (GMT)
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-11 16:23:03 (GMT)
commit2c36b1ec645991535ca974dc9e0d5ce812f0708a (patch)
treeb51d36974da86aa66618cf885c03d9f50bbb7c95 /src
parent7fe142cfcf27632a455ce193fa57c131afea61cc (diff)
downloadQt-2c36b1ec645991535ca974dc9e0d5ce812f0708a.zip
Qt-2c36b1ec645991535ca974dc9e0d5ce812f0708a.tar.gz
Qt-2c36b1ec645991535ca974dc9e0d5ce812f0708a.tar.bz2
don't mix calculated and forced permission bits
this commit just moves closing bracket to the function end Merge-request: 1176 Reviewed-by: Joerg Bornemann <joerg.bornemann@trolltech.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 2c9b977..a512bd6 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1481,25 +1481,25 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const
//### what to do with permissions if we don't use NTFS
// for now just add all permissions and what about exe missions ??
// also qt_ntfs_permission_lookup is now not set by defualt ... should it ?
- ret |= QAbstractFileEngine::ReadOtherPerm | QAbstractFileEngine::ReadGroupPerm
+ ret |= QAbstractFileEngine::ReadOtherPerm | QAbstractFileEngine::ReadGroupPerm
| QAbstractFileEngine::ReadOwnerPerm | QAbstractFileEngine::ReadUserPerm
| QAbstractFileEngine::WriteUserPerm | QAbstractFileEngine::WriteOwnerPerm
| QAbstractFileEngine::WriteGroupPerm | QAbstractFileEngine::WriteOtherPerm;
- }
- if (doStat()) {
- if (ret & (QAbstractFileEngine::WriteOwnerPerm | QAbstractFileEngine::WriteUserPerm |
- QAbstractFileEngine::WriteGroupPerm | QAbstractFileEngine::WriteOtherPerm)) {
- if (fileAttrib & FILE_ATTRIBUTE_READONLY)
- ret &= ~(QAbstractFileEngine::WriteOwnerPerm | QAbstractFileEngine::WriteUserPerm |
- QAbstractFileEngine::WriteGroupPerm | QAbstractFileEngine::WriteOtherPerm);
- }
+ if (doStat()) {
+ if (ret & (QAbstractFileEngine::WriteOwnerPerm | QAbstractFileEngine::WriteUserPerm |
+ QAbstractFileEngine::WriteGroupPerm | QAbstractFileEngine::WriteOtherPerm)) {
+ if (fileAttrib & FILE_ATTRIBUTE_READONLY)
+ ret &= ~(QAbstractFileEngine::WriteOwnerPerm | QAbstractFileEngine::WriteUserPerm |
+ QAbstractFileEngine::WriteGroupPerm | QAbstractFileEngine::WriteOtherPerm);
+ }
- QString ext = filePath.right(4).toLower();
- if (ext == QLatin1String(".exe") || ext == QLatin1String(".com") || ext == QLatin1String(".bat") ||
- ext == QLatin1String(".pif") || ext == QLatin1String(".cmd") || (fileAttrib & FILE_ATTRIBUTE_DIRECTORY))
- ret |= QAbstractFileEngine::ExeOwnerPerm | QAbstractFileEngine::ExeGroupPerm |
- QAbstractFileEngine::ExeOtherPerm | QAbstractFileEngine::ExeUserPerm;
+ QString ext = filePath.right(4).toLower();
+ if (ext == QLatin1String(".exe") || ext == QLatin1String(".com") || ext == QLatin1String(".bat") ||
+ ext == QLatin1String(".pif") || ext == QLatin1String(".cmd") || (fileAttrib & FILE_ATTRIBUTE_DIRECTORY))
+ ret |= QAbstractFileEngine::ExeOwnerPerm | QAbstractFileEngine::ExeGroupPerm |
+ QAbstractFileEngine::ExeOtherPerm | QAbstractFileEngine::ExeUserPerm;
+ }
}
return ret;
}