Fix empty files being excluded from restore list#110
Merged
Conversation
Change size filter comparison from <= to < so that files exactly matching the boundary are included. Remove default min size (0KB) to prevent zero-byte files from being silently excluded. Closes #107
Contributor
Code Metrics Report
Details | | main (cd458af) | #110 (5d54b1a) | +/- |
|---------------------|----------------|----------------|------|
| 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 | 2714 | 2713 | -1 |
+ | Test | 2315 | 2321 | +6 |
| Test Execution Time | 2s | 2s | 0s |Code coverage of files in pull request scope (97.5% β 97.5%)
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 a bug where empty (0-byte) files moved to trash are not shown in the restore TUI.
Background
Reported in Issue #107. When a user trashes an empty file created with
touch, the file is correctly moved to trash, but never appears in the restore list. The root cause is the defaultmin: 0KBconfig combined with the<=comparison in the size filter, which silently excludes zero-byte files.Changes
filter.go: Change size comparison from<=to<. Files exactly matching the boundary are now included; only files strictly below min or strictly above max are excludeddefaults.go: Remove defaultMin: "0KB". The minimum size filter is now disabled by defaultREADME.md: Update the size.min comment to reflect the new behaviorfilter_test.go: Add test case verifying that empty files are included withmin: 0KBCloses #107