Skip to content

[Bug]: Library Backup is only saved after certain write operations #1304

@Computerdores

Description

@Computerdores

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha 9.5.6 / latest git

Operating System & Version

--

Description

The library backup created when opening a library of older than expected version1 is only saved after some write operations have taken place.
One such write operation is the update of the library version2, which would mean that restoring from the backup is going to likely fail, since TS will assume that migrations that haven't been applied have already been applied.

Expected Behavior

Any write operations should only happen after a backup has been created, unless the library is already of the current version.

Steps to Reproduce

--

Logs

--

Footnotes

  1. see https://github.com/TagStudioDev/TagStudio/blob/main/src/tagstudio/core/library/alchemy/library.py#L535

  2. see https://github.com/TagStudioDev/TagStudio/blob/c4c749650ffd67ce784406935663f893072b6d27/src/tagstudio/core/library/alchemy/library.py#L460

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: CriticalAn issue that requires immediate attentionTagStudio: LibraryRelating to the TagStudio library systemType: BugSomething isn't working as intended

    Type

    Projects

    Status

    🛠 Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions