diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2009-08-11 18:11:37 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@trolltech.com> | 2009-08-11 18:23:51 +0200 |
commit | 1ff4c70e181e79456690a23a3af97cfef52c9f5e (patch) | |
tree | e0875255ef14ce085052dc9ab197eb7000ca6156 | |
parent | 2c36b1ec645991535ca974dc9e0d5ce812f0708a (diff) | |
download | qt4-tools-1ff4c70e181e79456690a23a3af97cfef52c9f5e.tar.gz |
don't mix link's target's permissions with link's Exe*Perm bits
Merge-request: 1176
Reviewed-by: Joerg Bornemann <joerg.bornemann@trolltech.com>
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index a512bd6d3e..9e341b9d1e 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1494,7 +1494,8 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const QAbstractFileEngine::WriteGroupPerm | QAbstractFileEngine::WriteOtherPerm); } - QString ext = filePath.right(4).toLower(); + QString fname = filePath.endsWith(QLatin1String(".lnk")) ? readLink(filePath) : filePath; + QString ext = fname.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 | |