File symlinks in a tracked folder on Windows come back as plain text files after a switch #207

Closed
opened 2026-10-27 01:04:01 -05:00 by ethan-hann · 1 comment
Owner

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.

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.
ethan-hann added this to the 1.0 milestone 2026-10-27 01:04:01 -05:00
Author
Owner

Shipped in 0.9.17 (PR 227).

Shipped in [0.9.17](https://git.tortal.tech/ethan-hann/SavePoint/releases/tag/v0.9.17) (PR 227).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint#207
No description provided.