jgraph / drawio-desktop

Official electron build of draw.io
https://www.diagrams.net
Apache License 2.0
49.17k stars 4.91k forks source link

Autosave backup files accumulating on Linux FS #989

Closed gskerry closed 2 weeks ago

gskerry commented 2 years ago

Preflight Checklist

Describe the bug Desktop client spams Linux filesystem with auto-save/lock files (e.g. ~$<file>.drawio.bkp)

To Reproduce Steps to reproduce the behavior: Save <file>.drawio locally on linux fs.

Expected behavior Remove after explicit save within Drawio; remove on program close; or automatically hide them.

draw.io version (In the Help->About menu of the draw.io editor):

Desktop (please complete the following information):

davidjgraph commented 2 years ago

This is the autosave draft, it's not windows specific.

gskerry commented 2 years ago

Are they supposed to remain after closing the Drawio desktop?

davidjgraph commented 2 years ago

Yes, we had some issues with empty files written, so this is used as a backup. Is this is a frequency of write issue because of disk damage?

JonathanLindsey commented 2 years ago

I'm on windows and also see this behavior.

It's annoying because the .drawio.bkp file gets left behind when draw.io is closed. You end up with 2 files for every document.

I would expect this file to be deleted when draw.io is closed. And while draw.io it is still open the file should either have the hidden attribute or be saved in another location. Maybe saving it in another location would defeat the purpose though.

gskerry commented 2 years ago

Yes, we had some issues with empty files written, so this is used as a backup. Is this is a frequency of write issue because of disk damage?

Don't know if this is to me (OP)? Not sure I fully follow the question... No disk damage that I am aware of. It's a filesystem hygiene issue for me. Nothing mission critical, but would prefer not to have the clutter on the fs.

wwdok commented 2 years ago

I'm on windows and also see this behavior.

It's annoying because the .drawio.bkp file gets left behind when draw.io is closed. You end up with 2 files for every document.

I would expect this file to be deleted when draw.io is closed. And while draw.io it is still open the file should either have the hidden attribute or be saved in another location. Maybe saving it in another location would defeat the purpose though.

This is also what i want to say ~

moongoal commented 1 year ago

Same here. An option to turn this behaviour off would be nice to have. I've never experienced empty files being written but the autosave files accumulating is very annoying.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

o-l-a-v commented 1 year ago

I store some .drawio files in my OneDrive, having .drawio.bkp files continously created and synced to the cloud seems unneccessary.

An option to redirect those temp / backup files to a different folder would be great. Like %LOCALAPPDATA%\Diagrams\Temp maybe?

gian1200 commented 1 year ago

Or to delete the .drawio.bkp file if the project was saved successfully (or has no unsaved changes)

hasan-4 commented 11 months ago

setting Extras->Drafts 0 (0 to disable) solved the problem for me.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.