Version: 8.0-release
Windows 10, mingw64-w64.

I'm attempting to use readline in a mingw compiled project and am seeing
that the history save is failing. If the history file doesn't exist it is
working, on having a history file, it fails.

Previously I was using v6.2 without any issues

Printing the status out in the sources to find out where it fails, it is
failing in histfile_restore when calling the rename function, which looks to
have been added for version 7.0


According to http://www.cplusplus.com/reference/cstdio/rename/ if the dest
file already exists, the function may either fail or override the existing
file, depending on the specific system and library implementation.


And looking at the Microsoft docs for rename:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/rename-wren
ame?view=vs-2019, it will return error EACCES when the
File or directory specified by newname already exists or could not be
created (invalid path); or oldname is a directory and newname specifies a
different path.


JD


_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to