I can confirm that the problem is in pgrename (dirmod.c),
something is not OK, with MoveFileEx, even with the
(MOVEFILE_REPLACE_EXISTING) flag.

Replacing MoveFileEx, with
unlink (to);
rename (from, to);

#if defined (WIN32) &&! defined (__ CYGWIN__)
unlink(to);
while (rename (from, to)! = 0)
#else
while (rename (from, to) <0)
#endif

The log messages have disappeared.

I suspect that if the target (to) file exists, MoveFileEx, it is failing to
rename, even with the flag enabled.

Windows have the native rename function (
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/rename-wrename?view=vs-2019
)
However, it fails if the target (to) file exists.

Question, is it acceptable delete the target file, if it exists, to
guarantee the rename?

regards,
Ranier Vilela

Attachment: logfile
Description: Binary data

Reply via email to