mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:55:42 +00:00
[SETUPLIB] GetSourcePaths(): Fix determination of the installation source path.
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.
This commit is contained in:
parent
2d655a487e
commit
3ddb05d443
2 changed files with 125 additions and 77 deletions
|
@ -171,9 +171,9 @@ InstallSetupInfFile(
|
|||
|
||||
NTSTATUS
|
||||
GetSourcePaths(
|
||||
OUT PUNICODE_STRING SourcePath,
|
||||
OUT PUNICODE_STRING SourceRootPath,
|
||||
OUT PUNICODE_STRING SourceRootDir);
|
||||
_Out_ PUNICODE_STRING SourcePath,
|
||||
_Out_ PUNICODE_STRING SourceRootPath,
|
||||
_Out_ PUNICODE_STRING SourceRootDir);
|
||||
|
||||
ERROR_NUMBER
|
||||
LoadSetupInf(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue