Skip to content

Restore rejects historical .config/ranger and .config/tmux snapshot paths #32

Description

@splaice

found-issue — found while implementing #1 / verifying live snapshots.

Problem

Pre-yazi / pre-tmux-drop backups record top-level paths such as:

  • PRESENT .config/ranger
  • PRESENT .config/tmux

_rel_is_managed_target only allows current _backup_targets, _managed_targets, and _legacy_restore_targets (aerospace, borders, karabiner, sketchybar). Those dropped app dirs are none of the three.

omacase restore <old-id> therefore aborts with unsafe path '.config/ranger' before any files are touched. The user cannot roll back a snapshot that is otherwise valid.

Verified against ~/.local/state/omacase/backups/20260815-210525 and every snapshot from 2026-06-13 through 2026-08-15 on this machine.

Why it matters

Restore is the escape hatch after a bad update. A historical snapshot that silently became unrestorable is the opposite of reversible.

Suggested fix

Extend _legacy_restore_targets with the dropped top-level dirs (ranger, tmux, and any other path that ever appeared in _managed_targets). Shape-driven restore from #13 already knows how to merge PRESENT directories and prune ABSENT ones without wiping siblings.

Not in scope of #13

#13's plan explicitly kept the legacy allowlist as written. This is follow-up.

Activity

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

    found-issueDefect found while implementing other work

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions