Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-06-22 13:09:32 +0300
committerHannah von Reth <vonreth@kde.org>2021-06-22 14:54:56 +0300
commitcd2a7a94d151889ff3dd06aaa1285d4ae15cf256 (patch)
treeb32b0371acf21a04328de22404f1a739b1cdc3f8 /src/common
parent4801648a5154e20b743690077df85f36bb8c9db2 (diff)
Only report locked files locked, not read only files
Diffstat (limited to 'src/common')
-rw-r--r--src/common/filesystembase.cpp7
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);
}