letsfindaway / OpenBoard

I'm using this fork to contribute features and fixes to the upstream project. In order to create good pull requests, I'm rebasing my feature branches, squashing and reordering commits, etc. If you fork this repository be aware that my development branches may rewrite history without prior notice.
http://openboard.ch/
GNU General Public License v3.0
9 stars 0 forks source link

Consider using QSaveFile to save documents and metadata #173

Open letsfindaway opened 8 months ago

letsfindaway commented 8 months ago

Qt provides a QSaveFile class which has advantages when saving document files. It uses a temporary file to save the data and in the end moves that temporary file to the final destination. This guarantees that the original file content is not lost even in case of errors during saving. You will always end up with either the original content or the new content, but never with a partially written file.

I think this is useful for document SVG files and for the metadata.

However I don't know how a move operation behaves on a network drive.