Skip to content

bugfix: Get path to 'mv' at runtime (fixes #509)#510

Merged
andy5995 merged 3 commits intomasterfrom
iss-509
Apr 8, 2026
Merged

bugfix: Get path to 'mv' at runtime (fixes #509)#510
andy5995 merged 3 commits intomasterfrom
iss-509

Conversation

@andy5995
Copy link
Copy Markdown
Member

@durable-vest I believe this will fix it. Can you test this PR or will it be easier to test after it's merged to master?

@andy5995 andy5995 added this to the v0.9.5 milestone Dec 30, 2025
@durable-vest
Copy link
Copy Markdown

durable-vest commented Jan 1, 2026

Seems to work fine when I quickly tested it (moving an empty directory into the trash), thanks for the fix!

@andy5995
Copy link
Copy Markdown
Member Author

andy5995 commented Jan 4, 2026

Seems to work fine when I quickly tested it (moving an empty directory into the trash), thanks for the fix!

Awesome! I just gotta do a bit more work on this, as I realized that this will break the appimage in some cases, and it's broken by hard-coding '/bin/mv' as well.

@andy5995 andy5995 changed the title bugfix: Get path to 'mv' using meson (fixes #509) bugfix: Get path to 'mv' at runtime (fixes #509) Mar 25, 2026
@andy5995
Copy link
Copy Markdown
Member Author

@durable-vest I've made a change. Could you test this one more time? If it works for you, I'll merge to master and do a release soon.

@andy5995 andy5995 force-pushed the iss-509 branch 4 times, most recently from 3364054 to c4eeb23 Compare March 25, 2026 03:01
andy5995 and others added 3 commits March 26, 2026 01:04
Using execvp("mv", ...) searches PATH at runtime instead of compiling
in a build-time path, which also fixes the NixOS case without needing
Meson to discover mv.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename variables for clarity: BTRFS_IMAGE_MOUNTPOINT -> BTRFS_MOUNTPOINT,
  IMAGE_PATH -> BTRFS_IMAGE, SUBVOLUME_USED -> BTRFS_SUBVOLUME,
  WASTE_USED -> BTRFS_WASTE_DIR, TEST_DIR -> BTRFS_TEST_DIR,
  RMW_TEST_CMD_STRING -> BTRFS_RMW_CMD
- Derive BTRFS_SUBVOLUME from BTRFS_MOUNTPOINT instead of hardcoding
- Inline single-use IS_BTRFS_MOUNTED variable
- Add trashinfo assertions after each move, restore, and purge
- Add nested directory test (a/b/c/deep_file) covering safe_mv_via_exec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@andy5995 andy5995 merged commit f8f4b71 into master Apr 8, 2026
17 checks passed
@andy5995 andy5995 deleted the iss-509 branch April 8, 2026 09:06
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.

2 participants