mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 12:57:01 +02:00
Reported in #265 by Kayyo321; first fixed in #267 by Jean-LucTch, whose approach this keeps to the folder being installed. "Install folder" named each file with fs::relative, which follows links: a file link inside the folder to a file outside it came out as ../../<file>, and the copy wrote over that file (ReSkate.dll among what it could reach). - Files are named by where they sit in the chosen folder (lexically_relative), never by where a link leads, and go through safe_entry like a zip's entries. - A symbolic link, junction or mount point inside the folder refuses the install, saying which. Links on the way to the folder or to the Mods folder (a library moved to another drive) stay fine, as do cloud placeholders such as OneDrive's, which name nothing else: #267 refused any reparse point on those paths, so a game reached through a junction could install nothing. - Tests: a junction inside a mod folder is refused and the file it leads to is untouched, with no staging left behind (this fails without the fix); a Mods folder and a picked folder reached through junctions still install; a file symbolic link is refused (skipped without Developer Mode, which creating one needs). Co-authored-by: Jean-Luc T. <88255067+Jean-LucTch@users.noreply.github.com>