Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.6, 5.8
-
None
-
Windows Server 2012 R2, Qt compiled with MSVC.
Description
I have several applications written in Haskell that monitor changes to sources I'm working on and recompile them on save.
When I start such application and try to edit&save a source from KDE Kate, I get an error telling me it has fail to save. I've tracked this down to `qfsfileengine_win.cpp:551`:
bool ret = ::MoveFileEx((wchar_t*)d->fileEntry.nativeFilePath().utf16(), (wchar_t*)QFileSystemEntry(newName).nativeFilePath().utf16(), MOVEFILE_REPLACE_EXISTING) != 0;
This return false in my case, and `GetLastError()` says `32`, which means
ERROR_SHARING_VIOLATION
32 (0x20)
The process cannot access the file because it is being used by another process.
I guess, when other application watches a file, this function doesn't work.