NTSTATUS
GetSourcePaths(PUNICODE_STRING SourcePath,
- PUNICODE_STRING SourceRootPath)
+ PUNICODE_STRING SourceRootPath,
+ PUNICODE_STRING SourceRootDir)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING LinkName;
if (NT_SUCCESS(Status))
{
RtlCreateUnicodeString(SourcePath,
- SourceName.Buffer);
+ SourceName.Buffer);
/* strip trailing directory */
Ptr = wcsrchr(SourceName.Buffer, L'\\');
-// if ((Ptr != NULL) &&
-// (wcsicmp(Ptr, L"\\reactos") == 0))
- if (Ptr != NULL)
- *Ptr = 0;
+ if (Ptr)
+ RtlCreateUnicodeString(SourceRootDir, Ptr);
+ else
+ RtlCreateUnicodeString(SourceRootDir, L"");
+ if (Ptr != NULL)
+ *Ptr = 0;
RtlCreateUnicodeString(SourceRootPath,
- SourceName.Buffer);
+ SourceName.Buffer);
}
NtClose(Handle);
NTSTATUS
GetSourcePaths(PUNICODE_STRING SourcePath,
- PUNICODE_STRING SourceRootPath);
+ PUNICODE_STRING SourceRootPath,
+ PUNICODE_STRING SourceRootDir);
#endif /* __DRIVESUP_H__ */
HANDLE ProcessHeap;
UNICODE_STRING SourceRootPath;
+UNICODE_STRING SourceRootDir;
UNICODE_STRING SourcePath;
BOOLEAN IsUnattendedSetup = FALSE;
LONG UnattendDestinationDiskNumber;
/* Get the source path and source root path */
Status = GetSourcePaths(&SourcePath,
- &SourceRootPath);
+ &SourceRootPath,
+ &SourceRootDir);
if (!NT_SUCCESS(Status))
{
CONSOLE_PrintTextXY(6, 15, "GetSourcePaths() failed (Status 0x%08lx)", Status);
{
CONSOLE_PrintTextXY(6, 15, "SourcePath: '%wZ'", &SourcePath);
CONSOLE_PrintTextXY(6, 16, "SourceRootPath: '%wZ'", &SourceRootPath);
+ CONSOLE_PrintTextXY(6, 17, "SourceRootDir: '%wZ'", &SourceRootDir);
}
#endif
if (!SetupQueueCopy(SetupFileQueue,
SourceCabinet,
SourceRootPath.Buffer,
- L"\\reactos",
+ SourceRootDir.Buffer,
FileKeyName,
DirKeyValue,
TargetFileName))
/* Initialize global unicode strings */
RtlInitUnicodeString(&SourcePath, NULL);
RtlInitUnicodeString(&SourceRootPath, NULL);
+ RtlInitUnicodeString(&SourceRootDir, NULL);
RtlInitUnicodeString(&InstallPath, NULL);
RtlInitUnicodeString(&DestinationPath, NULL);
RtlInitUnicodeString(&DestinationArcPath, NULL);