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

[9.4.x] Create auto-backup of library for use in save failures (Fix #343) #554

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

CyanVoxel
Copy link
Member

This PR adds a basic library autosave feature which creates a copy of the library on load which can be automatically loaded in the event that the main library becomes blank or missing. In addition, this moves the self.to_json() call inside the library save method to outside of the with block as suggested in #343, which should prevent most cases of TagStudio writing a blank library to disk.

I'm looking at this as a bugfix to be added in a future 9.4.2 patch. Since 9.5/main uses a completely different SQLite backend, this change is really just to provide a bit more safety and stability for the current 9.4.x releases in the meantime. This "feature" will die with that branch and is effectively obsolete as-is (not to sound somber).

@CyanVoxel CyanVoxel added Priority: Critical An issue that requires immediate attention TagStudio: Library Relating to the TagStudio library system Status: Review Needed A review of this is needed Type: File System File system interactions labels Oct 20, 2024
@CyanVoxel CyanVoxel removed the Status: Review Needed A review of this is needed label Nov 4, 2024
@CyanVoxel CyanVoxel merged commit 1406459 into Alpha-v9.4 Nov 4, 2024
8 checks passed
@CyanVoxel CyanVoxel removed the Priority: Critical An issue that requires immediate attention label Nov 4, 2024
@CyanVoxel CyanVoxel deleted the fix-343 branch November 4, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TagStudio: Library Relating to the TagStudio library system Type: File System File system interactions
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

1 participant