http://bugs.winehq.org/show_bug.cgi?id=59766 Bug ID: 59766 Summary: NtSetInformationFile FileRenameInformation in place move does not work correctly (PaintTool SAI 2) Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@list.winehq.org Reporter: katharine.chui@gmail.com Distribution: --- Created attachment 80970 --> http://bugs.winehq.org/attachment.cgi?id=80970 small program for reproducting the error Under WINE, PaintTool SAI 2 (https://www.systemax.jp/bin/sai2-20241123-32bit-en.zip ) currently pops an error while user draws to a canvas, as it creates an on-disk undo/redo cache file, performs a few read/write, then uses `NtSetInformationFile FileRenameInformation` to in-place move the opened file. This does not currently work as WINE is not handling `FILE_RENAME_INFORMATION.RootDirectory == NULL` along with a simple path in `FILE_RENAME_INFORMATION.FileName` for in-place rename. The current code assumes `RootDirectory == NULL` means full path in `FileName`. The `NtSetInformationFile` call works under Windows 10. It is also noted here https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntif... , to perform in-place rename, it is okay for RootDirectory to be NULL, while FileName only needs to be a simple file name. Below attaches a small program for reproducing the error. The program can be built with mingw-w64 toolchain by running `i686-w64-mingw32-gcc -static file_rename.c -lntdll -o out.exe`. The program was tested working under Windows 10. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.