With winsymlink=0 Go reports a junction as ModeSymlink instead of
ModeIrregular, so IsJunction returned false and the trash fallback
recreated the junction with os.Symlink again. Read the reparse tag for
both modes.
Refs #420
When the skills source and the trash live on different volumes, the
cross-device fallback in moveLink and copyDir recreated a Windows
junction with os.Symlink. That needs Developer Mode or elevation, which
the junction was chosen to avoid, so `unlink` and `trash restore` could
fail after `link` had succeeded.
Recreate a junction as a junction through a shared helper, and keep the
original link in place when creation fails. CreateJunction moves from
internal/sync to internal/utils so trash can reuse it.
Refs #420
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