diff options
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); } |