mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
canonicalPath relied on filepath.EvalSymlinks, which since Go 1.23 leaves a Windows junction component in place. A link whose target is itself a junction, or sits below one, was followed as the unresolved junction: the walk saw no descendants while the inventory counted as complete, so target entries from that link could be pruned, and a sync target spelled through a junction could evade the overlap guard. Every existing path component is now resolved hop by hop, and a target that still ends in a link marks the link unavailable instead of being followed. The policy also kept the source root as spelled, so a relative global source was discovered but never resolved for writes or audit. Root, first-level and Resolve comparisons now use the same canonical absolute form. Copy and checksum roots get the same one-hop resolution so a followed junction that is itself a skill no longer trips the cycle guard.