Hello,
if two instances of Xournal are running, both may open and edit the same file. Only the version of in that Xournal instance that is closed last, will remain, the other version is overwritten. As I lost data multiple times to that, I thought about filing an issue. Frankly, I don't see a use case to opening a file twice in Xournal, so I'd suggest to lock open files and warn the user about opening a file multiple times.
There are people that actually require this for some reason or another.
We could make Xournal++ recheck the file for changes compared to the file it opened and warn the user before saving though.
Implementation details:
Generate a hash of the read file and regenerate one before saving and compare both.
sounds good, thank you :)
Most helpful comment
Implementation details:
Generate a hash of the read file and regenerate one before saving and compare both.