diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-06-22 13:09:32 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-06-22 14:54:56 +0300 |
commit | cd2a7a94d151889ff3dd06aaa1285d4ae15cf256 (patch) | |
tree | b32b0371acf21a04328de22404f1a739b1cdc3f8 /src/common | |
parent | 4801648a5154e20b743690077df85f36bb8c9db2 (diff) |
Only report locked files locked, not read only files
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/filesystembase.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/filesystembase.cpp b/src/common/filesystembase.cpp index 4ae24c870..b2bb93ae3 100644 --- a/src/common/filesystembase.cpp +++ b/src/common/filesystembase.cpp @@ -467,9 +467,10 @@ bool FileSystem::isFileLocked(const QString &fileName, LockMode mode) NULL); if (win_h == INVALID_HANDLE_VALUE) { - /* could not be opened, so locked? */ - /* 32 == ERROR_SHARING_VIOLATION */ - return true; + if (GetLastError() == ERROR_SHARING_VIOLATION) { + return true; + } + return false; } else { CloseHandle(win_h); } |