-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.8.6
-
None
We have run into an issue on LyX due to the fact that QTemporaryFile seems to behave differently on Windows and elsewhere. When we save a file (in the 2.2dev version), we write it to a temporary file and then rename that, if it works, thus preserving the original file if it fails. This works fine on Linux, at least, but on Windows the renaming fails.
This looks to be a version of QTBUG-10856 and/or QTBUG-13388, which were said not to be bugs, but the issue here is different: The renaming seems to work fine on Linux, but not on Windows.
I note, by the way, that at the end of the former bug report, João Abecasis said: "What you can do is create the temporary file, write to it, and then rename it to some more definitive name. At that point, you should call setAutoRemove(false) to make sure you won't attempt to delete this file." That is exactly what one cannot do on Windows.