mirror of
https://github.com/yarlson/lnk.git
synced 2025-09-02 18:12:33 +02:00
Fixes #2: https://github.com/yarlson/lnk/issues/2 Previously, files with the same basename (e.g., a/config.json and b/config.json) would overwrite each other in the repository, causing data loss. The second file would completely replace the first, and removing files would fail with 'no such file or directory' errors. Changes: - Store files using unique names based on full relative paths (slashes → underscores) - Track full relative paths in .lnk file instead of just basenames - Generate repository names from relative paths to prevent collisions - Update symlink restoration to work with new path-based system - Add comprehensive tests for basename collision scenarios This ensures each file maintains its unique content and can be managed independently, eliminating the data loss issue.