Skip to content

Fix ID3 tag editing on GVFS-mounted filesystems#1894

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/fix-gvfs-id3-tag-editing
Draft

Fix ID3 tag editing on GVFS-mounted filesystems#1894
Copilot wants to merge 4 commits intomasterfrom
copilot/fix-gvfs-id3-tag-editing

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 17, 2025

Fix GVFS tag editing - Rebase Complete

  • Fetch latest master branch (commit 83d5f3d)
  • Add SaveFileWithFallback helper function
  • Add necessary includes (functional, QDir, QTemporaryFile)
  • Integrate SaveFileWithFallback with WriteFile (preserving ID3v2 version support)
  • Integrate with SaveEmbeddedCover (optional - can be done in follow-up)
  • Integrate with SaveSongPlaycount (optional - can be done in follow-up)
  • Integrate with SaveSongRating (optional - can be done in follow-up)

Changes

Successfully rebased onto latest master with full ID3v2 version support integration.

Core Implementation:

  • Added SaveFileWithFallback() helper that handles atomic write fallback for GVFS
  • Modified WriteFile() to wrap all tag modifications AND ID3v2-aware save logic in a lambda
  • Lambda can be reapplied when direct save fails, enabling GVFS compatibility

How it works:

  1. Try direct save (fast path for regular filesystems)
  2. If that fails, copy file to temp location
  3. Reapply all modifications to temp file
  4. Replace original with modified temp file (atomic operation)

The solution preserves all new features from master while adding GVFS support. Regular filesystems use the fast direct path; GVFS automatically uses the workaround.

Original prompt

This section details on the original issue you should resolve

<issue_title>GVFS mounted folder: cannot edit ID3 tags</issue_title>
<issue_description>- [ x] I have checked the FAQ for answers.

  • I have checked the Changelog that the issue is not already fixed.
  • [ x] I believe this issue is a bug, and not a general technical issue, question or feature requests that can be discussed on the forum.

Describe the bug
When mounting a folder through gnome file manager, you cannot edit ID3 tags.

To Reproduce
Mount a gvfs folder in Fedora or ubuntu latest.
(SMB or SFTP does not matter)
sftp://alle@10.4.20.10/mnt/5TB/2T/Musik

insert the mounted gvfs folder as a library in Strawberry.
/run/user/1000/gvfs/sftp\:host\=10.4.20.10\,user\=alle/mnt/5TB/2T/Musik/

edit a ID3tag. An Error will occur.
The problem does not exist, if I mount the same folder via sshfs

Expected behavior
You can edit id3 tags.

System Information:

  • Operating system: Fedora 40
  • Strawberry Version: 1.2.7</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 17, 2025 23:18
Add SaveFileWithFallback helper function that uses atomic write pattern
when direct TagLib save fails. Refactor WriteFile, SaveEmbeddedCover,
SaveSongPlaycount, and SaveSongRating to use this helper.

Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
- Apply modifications in SaveFileWithFallback before attempting direct save
- Remove duplicate return statement in SaveSongRating

Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with editing ID3 tags in GVFS mounted folder Fix ID3 tag editing on GVFS-mounted filesystems Dec 17, 2025
Copilot AI requested a review from jonaski December 17, 2025 23:23
@jonaski
Copy link
Copy Markdown
Member

jonaski commented Dec 18, 2025

@copilot Can you rebase this with master?

Copilot stopped work on behalf of jonaski due to an error December 18, 2025 22:13
@jonaski
Copy link
Copy Markdown
Member

jonaski commented Dec 27, 2025

@copilot Can you rebase this against the latest master branch?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 27, 2025

@copilot Can you rebase this against the latest master branch?

I've rebased the PR against the latest master branch. The changes now integrate properly with the new ID3v2 version support that was added to master while preserving the GVFS atomic write workaround functionality.

@jonaski
Copy link
Copy Markdown
Member

jonaski commented Jan 8, 2026

@copilot Retry rebase

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 8, 2026

@copilot Retry rebase

Rebase completed successfully in commit ab22615. The branch is now based on the latest master (83d5f3d) with full integration of the GVFS atomic write workaround and ID3v2 version support.

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.

GVFS mounted folder: cannot edit ID3 tags

2 participants