mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
With follow_source_links on, discovery reports <source>/_dev-skills/foo, but every write to it was refused: sourcefs rejects a link in the path, and its source-root os.Root refuses descendants outside the source. Dashboard edits, nested uninstall, regular skill replacement, and tracked installs under such a link all failed, although writing through a link the user placed is the agreed behavior (#410). sourcefs.Open, Create, MkdirAllIn, and CheckMoveOut take the operation's optional sourcewalk.Follow. A clean name <link>/<rest> whose first component the policy follows is handled by a second os.Root opened at the link's canonical target, with the same per-component link check on <rest>, so a nested link or ".." still cannot escape the target. Names with ".." keep the source root, which refuses them through the link. Without a policy nothing changes. The link entry itself stays a link: RemoveAll, Rename, and writes on it are refused, install --track --force still refuses to replace it, and CheckMoveOut still lets trash rename the link without following it. MkdirAll on a followed link is a no-op, since it already is that directory; install --into needs that. A rename across the link boundary is refused. The install, update, uninstall, and server callers pass the same policy their discovery uses, through InstallOptions.SourceFollow and the update context. No raw-write allowance was needed. Refs #274