mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
Since Go 1.23, os.Lstat reports NTFS junctions as irregular files instead of symlinks (winsymlink, active for go 1.25 in go.mod). Every check that looked only at os.ModeSymlink therefore missed the junctions skillshare itself creates on Windows: linked skills could be treated as local folders, backed up, copied through, or left behind on prune. Detect links through utils.IsLinkMode, which also asks the OS about the reparse tag of irregular entries, and count only real symlinks and junctions as links so OneDrive placeholders and deduplicated files stay regular files. restore.go also used os.Stat for its link check, which follows the link and never matched. Refs #299
7 lines
160 B
Go
7 lines
160 B
Go
//go:build !windows
|
|
|
|
package utils
|
|
|
|
// platformIsJunction returns false: junctions exist only on Windows.
|
|
func platformIsJunction(string) bool { return false }
|