File symlinks in a tracked folder on Windows come back as plain text files after a switch #207
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ethan-hann/SavePoint#207
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Windows SavePoint sets core.symlinks=false, so git stores a file symlink as a link entry (mode 120000, content = the target path) and a switch or discard writes a plain text file holding that path instead of the link. A mod manager's symlink deployment (Vortex's symlink_activator, used when its staging folder is on another drive) stops loading after the first switch, and the mod manager's deployment record no longer matches the folder. The mod files themselves are untouched in the mod manager's staging folder. Found on a real 7 Days to Die setup: %APPDATA%\7DaysToDie\Mods holds 843 file symlinks into a Vortex staging folder on another drive. The same happens today to any install folder a mod manager deploys into by symlink.
Fix: extend D29.1 (linked folders are refused on Windows) to file symlinks on Windows. Capture, the launch preview and the switch refuse a folder that holds a file symlink, with its own error id and plain copy that names the file and says a mod manager's link deployment can't be snapshotted, and to switch the mod manager to its hardlink or move deployment. Measure the cheapest detection on a large folder (git ls-files -s mode 120000 after staging vs probing LinkTarget). Linux and macOS store and restore links natively and are not affected.
Shipped in 0.9.17 (PR 227).