Skip to content

fix: implement NTFS hardlink fallback and updated warnings#39

Closed
unpetrifiedstone2005 wants to merge 1 commit intomainfrom
fix/ntfs-hardlink-fallback
Closed

fix: implement NTFS hardlink fallback and updated warnings#39
unpetrifiedstone2005 wants to merge 1 commit intomainfrom
fix/ntfs-hardlink-fallback

Conversation

@unpetrifiedstone2005
Copy link
Copy Markdown
Collaborator

This commit adds a fallback to hardlinks when reflinks fail on NTFS/WSL and updates user messaging to guide users toward the correct flags.

Closes #34

This commit adds a fallback to hardlinks when reflinks fail on NTFS/WSL
and updates user messaging to guide users toward the correct flags.

Closes #34
Copy link
Copy Markdown
Owner

@Rakshat28 Rakshat28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't hardcode 'NTFS' or 'WSL' into our core error messages. While WSL/NTFS is the most common way users hit this bug, the actual underlying system error is an EXDEV (Cross-device link) failure. This OS-level error occurs whenever a hardlink is attempted across any two different partitions, drives, or filesystems.

To fully resolve Issue #34, we need to address the root architecture:

  1. Generic Error Handling: The error messages should indicate a 'Cross-device link' or 'Filesystem boundary' failure, rather than assuming NTFS.
  2. Testing: We need a test case that triggers a cross-boundary failure to prove the fallback works.
  3. The Vault Location: Currently, vault::vault_root() defaults to ~/.imprint/store. If a user targets an external drive, std::fs::hard_link will always fail. We likely need to discuss modifying the engine to initialize localized .imprint vaults at the root of the target drive.

@Rakshat28
Copy link
Copy Markdown
Owner

Closing this PR because we need to address the root EXDEV architectural limitation rather than just updating the error strings

@Rakshat28 Rakshat28 closed this Mar 25, 2026
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.

Validate hardlink fallback logic on NTFS (via WSL or mounted drives)

2 participants