Maybe you could use QTemporaryFile instead?
Maybe you could use QTemporaryFile instead?
Thanks for the suggestion, but I'm not sure that will work the way I want it to.
I am basically working on a save mechanism where there is a saved file, and a working file. On a save operation, I want to move the saved file to a temporary name, copy the working file to the saved file name, and then delete the temporary file on success, or rename it back to the saved file if the copy fails. The rename is key, because copying the working file to the save file is the goal, and the rename will free up the save file name.
Check if you are not trying to delete an opened file.
Doh! Yes, that was the problem. The file was being opened with a QLockedFile somewhere else in the program. Funny how that didn't stop the operation on Linux!
Anyway, thank you both very much for your help. I still have some hair left.![]()
Bookmarks