mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 11:48:04 +00:00
- Remove '\.\' sequences from destination file name in CabinetExtractFile.
svn path=/trunk/; revision=7758
This commit is contained in:
parent
11a4e44d62
commit
68ac8c2fb9
|
@ -1618,6 +1618,7 @@ CabinetExtractFile(PWCHAR FileName)
|
|||
FILETIME FileTime;
|
||||
WCHAR DestName[MAX_PATH];
|
||||
WCHAR TempName[MAX_PATH];
|
||||
PWCHAR s;
|
||||
NTSTATUS NtStatus;
|
||||
UNICODE_STRING UnicodeString;
|
||||
IO_STATUS_BLOCK IoStatusBlock;
|
||||
|
@ -1654,10 +1655,16 @@ CabinetExtractFile(PWCHAR FileName)
|
|||
wcscpy(DestName, DestPath);
|
||||
wcscat(DestName, FileName);
|
||||
|
||||
while (NULL != (s = wcsstr(DestName, L"\\.\\")))
|
||||
{
|
||||
memmove(s, s + 2, (wcslen(s + 2) + 1) *sizeof(WCHAR));
|
||||
}
|
||||
|
||||
/* Create destination file, fail if it already exists */
|
||||
RtlInitUnicodeString(&UnicodeString,
|
||||
DestName);
|
||||
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&UnicodeString,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
|
|
Loading…
Reference in a new issue