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;
|
FILETIME FileTime;
|
||||||
WCHAR DestName[MAX_PATH];
|
WCHAR DestName[MAX_PATH];
|
||||||
WCHAR TempName[MAX_PATH];
|
WCHAR TempName[MAX_PATH];
|
||||||
|
PWCHAR s;
|
||||||
NTSTATUS NtStatus;
|
NTSTATUS NtStatus;
|
||||||
UNICODE_STRING UnicodeString;
|
UNICODE_STRING UnicodeString;
|
||||||
IO_STATUS_BLOCK IoStatusBlock;
|
IO_STATUS_BLOCK IoStatusBlock;
|
||||||
|
@ -1653,11 +1654,17 @@ CabinetExtractFile(PWCHAR FileName)
|
||||||
|
|
||||||
wcscpy(DestName, DestPath);
|
wcscpy(DestName, DestPath);
|
||||||
wcscat(DestName, FileName);
|
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 */
|
/* Create destination file, fail if it already exists */
|
||||||
RtlInitUnicodeString(&UnicodeString,
|
RtlInitUnicodeString(&UnicodeString,
|
||||||
DestName);
|
DestName);
|
||||||
|
|
||||||
|
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&UnicodeString,
|
&UnicodeString,
|
||||||
OBJ_CASE_INSENSITIVE,
|
OBJ_CASE_INSENSITIVE,
|
||||||
|
|
Loading…
Reference in a new issue