Skip to content

Fix: Preserve tags when xattr writes fail - #153

Merged
MemerGamer merged 3 commits into
mainfrom
linux/a4-tags-ro
Oct 10, 2026
Merged

MemerGamer merged 3 commits into
mainfrom
linux/a4-tags-ro

Conversation

@MemerGamer

Copy link
Copy Markdown
Owner

Resolved / Related Issues

Fixes #148

When user.xdg.tags is readable but cannot be written, later tag edits and deferred loads could restore stale xattr values over the database fallback. Track unsynchronized paths and use their database tags for reads, queued edits, and deferred item callbacks, including empty tag sets. Resume xattr authority only after a successful write.

Steps used to test these changes

All builds and tests ran serially under flock ~/.cache/linuxfiles-agents/build.lock, at low priority with display variables unset.

  1. Ran the expanded helper tests against the original implementation: 6 regression failures, including a real file with readable xattrs and read-only permissions.
  2. Built tests/Files.Platform.Tests/Files.Platform.Tests.csproj in Debug/x64 with warnings treated as errors: 0 warnings, 0 errors.
  3. Ran the focused tag tests with --filter 'FullyQualifiedName~Files.Platform.Tests.Tags': 21 passed, 0 failed, 0 skipped. Covers successive edits across item instances, deferred snapshots, failed removal, database persistence, and successful resynchronization.
  4. Built src/Files.App/Files.App.csproj in Debug/x64 for net10.0-desktop, with FilesWin32Compat=false: 0 errors (585 warnings).
  5. Checked git diff --check and verified CRLF line endings in all three changed files.

🤖 Generated with Claude Code

Claude session

MemerGamer and others added 3 commits October 10, 2026 12:06
Co-Authored-By: GPT-6.1-sol (OpenAI Codex) <noreply@openai.com>
Claude-Session: https://claude.ai/code/session_016FAtbHHLQSiJiYcw2vnKiq
Co-Authored-By: GPT-6.1-sol (OpenAI Codex) <noreply@openai.com>
Claude-Session: https://claude.ai/code/session_016FAtbHHLQSiJiYcw2vnKiq
@MemerGamer
MemerGamer merged commit 486d3e8 into main Oct 10, 2026
3 checks passed
@MemerGamer
MemerGamer deleted the linux/a4-tags-ro branch October 10, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tags: successive edits on read-only tagged files can drop tags (xattr write fails)

1 participant