mirror of
https://github.com/reactos/reactos.git
synced 2026-05-24 00:00:41 +08:00
Refine the algorithm introduced in commitc560342f08(r75667, r75676), whereby the installation source path is based on the full image file path of the installer program, and of the \SystemRoot symlink. Also reverts commit6f389a35db"Add a workaround for installing from USB drives" CORE-17818 + SAL2-annotate and add Doxygen comments. ---- In case the \SystemRoot full path prefixes the image file path, use the resolved \SystemRoot as the installation source path. Otherwise, use the image file path. The \SystemRoot symlink target resolution needs full path reparsing, because it can reference other symlinks. This is what happens, for example when booting the installation from a removable hard-disk. We can have: \SystemRoot ---> \Device\Harddisk1\Partition1\ReactOS and: \Device\Harddisk1\Partition1 ---> \Device\HarddiskVolume2 etc. and we wish to resolve \SystemRoot to: \Device\HarddiskVolume2\ReactOS instead of keeping the former version (using Harddisk1\Partition1). We then verify whether it prefixes the image file path, which is a fully reparsed path.