Fix cross-device link error in legacy storage#112
Merged
Conversation
Enable fallback copy in fs.Move calls for legacy storage put, restore, and rollback operations. Previously these used rename-only mode which fails across different filesystems (e.g. NTFS). Closes #104
Contributor
Code Metrics Report
Details | | main (a985806) | #112 (c2ff195) | +/- |
|---------------------|----------------|----------------|------|
| Coverage | 50.0% | 50.0% | 0.0% |
| Files | 23 | 23 | 0 |
| Lines | 1087 | 1087 | 0 |
| Covered | 544 | 544 | 0 |
| Code to Test Ratio | 1:0.8 | 1:0.8 | 0.0 |
| Code | 2713 | 2713 | 0 |
| Test | 2321 | 2321 | 0 |
| Test Execution Time | 2s | 2s | 0s |Code coverage of files in pull request scope (0.0% β 0.0%)
Reported by octocov |
Merged
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Mar 25, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [babarot/gomi](https://github.com/babarot/gomi) | patch | `v1.6.2` β `v1.6.3` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>babarot/gomi (babarot/gomi)</summary> ### [`v1.6.3`](https://github.com/babarot/gomi/blob/HEAD/CHANGELOG.md#v163---2026-03-20) [Compare Source](babarot/gomi@v1.6.2...v1.6.3) ##### Bug fixes - Fix files with dollar signs in names being incorrectly expanded by [@​babarot](https://github.com/babarot) in [#​111](babarot/gomi#111) - Fix cross-device link error in legacy storage by [@​babarot](https://github.com/babarot) in [#​112](babarot/gomi#112) ##### Improvements - Fix empty files being excluded from restore list by [@​babarot](https://github.com/babarot) in [#​110](babarot/gomi#110) - Fix gomi\_dir being ignored when strategy is auto by [@​babarot](https://github.com/babarot) in [#​113](babarot/gomi#113) - Fix colors invisible on light terminal backgrounds by [@​babarot](https://github.com/babarot) in [#​114](babarot/gomi#114) </details> --- ### Configuration π **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). π¦ **Automerge**: Enabled. β» **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. π **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My44Ny4xIiwidXBkYXRlZEluVmVyIjoiNDMuODcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix
invalid cross-device linkerror when using legacy storage with a trash directory on a different filesystem (e.g. NTFS mounted drive).Background
Reported in Issue #104. When
gomi_diris set to a path on a different filesystem (e.g./media/archive/Trashon NTFS while home is on ext4), thePutoperation fails becauseos.Renamecannot move files across device boundaries. Thefs.Moveutility already supports fallback copy-and-delete for this scenario, but legacy storage was calling it withfallbackCopy: false.The XDG storage already handles this correctly by passing
s.config.HomeFallbacktofs.Move.Changes
legacy/storage.go: Changefs.Movecalls fromfallbackCopy: falsetotruein three places:Put: moving file to trashPutrollback: moving file back on history save failureRestore: moving file from trash to original locationCloses #104