Skip to content

fix(storage): FoldersStorage.save is not transactional and load() never retries after a failure #1767

Closed

Description

@ZhuchkaTriplesix

Problem

  • `FoldersStorage.save` calls `LocalDb.clearFolders()` and then adds the folders one by one. A failure in the middle leaves only some of the folders.
  • `FoldersStorage.load` sets `_loaded = true` even when reading failed and `_folders` is empty, so it never retries until `reload()`.

Fix

Replace the folder list in one transaction (a `replaceFolders` in `FolderRepository`), and only mark the storage loaded after a successful read.

Found in the system-functions review (see #1764).

Activity

  1. added
    bugSomething isn't working
    storageTheme parser epic label: storage
    P3Low priority / Polish & Enhancements
    on Oct 25, 2026
  2. added a commit that references this issue on Oct 25, 2026
  3. ZhuchkaTriplesix commented on Oct 25, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Fixed on dev in #1788 (merged). Closing by hand: the PRs target dev, so GitHub would only close this when dev is merged into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority / Polish & EnhancementsbugSomething isn't workingstorageTheme parser epic label: storage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions