Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe save option #720

Closed
klayoutmatthias opened this issue Feb 1, 2021 · 2 comments
Closed

Safe save option #720

klayoutmatthias opened this issue Feb 1, 2021 · 2 comments
Labels
Milestone

Comments

@klayoutmatthias
Copy link
Collaborator

Maybe that is because more users are using KLayout on Windows shares, maybe through VPN connections as many people are working from home now ...

But I receive requests to implement a "safe save" which would not destroy the file that is overwritten in case of network problems or full disks.

Another aspect is that KLayout could keep a configurable number of backup files.

@klayoutmatthias
Copy link
Collaborator Author

The solution of branch issue-720 implements the following:

  • While writing to an existing file, the file is kept in background as "original_file.~backup". This backup file is only deleted when the file has been written successfully. This applies to write errors and logical (layout style) errors.
  • In "Setup/General" the number of backups to keep can be configured. Default is 0 (no backup).
  • Backup files are named by adding ".1", ".2" etc. to the original file name. Backup files are shuffled - i.e. ".1" is the most recent backup, ".2" the previous etc.

@klayoutmatthias klayoutmatthias added this to the 0.26.10 milestone Feb 1, 2021
@klayoutmatthias
Copy link
Collaborator Author

klayoutmatthias commented Feb 1, 2021

Fixed by PR #721.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant