Skip to content

Commit

Permalink
Update file_del.c
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Apr 28, 2024
1 parent e194528 commit d99e556
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Sandboxie/core/dll/file_del.c
Expand Up @@ -771,7 +771,6 @@ _FX BOOLEAN File_LoadPathTree_internal(LIST* Root, const WCHAR* name, WCHAR* (*T
_FX WCHAR *File_TranslateDosToNtPathForDatFile(const WCHAR *DosPath)
{
WCHAR *NtPath = NULL;
ULONG len_dos;

if (DosPath && DosPath[0] && DosPath[1]) {

Expand All @@ -782,10 +781,7 @@ _FX WCHAR *File_TranslateDosToNtPathForDatFile(const WCHAR *DosPath)
//

DosPath += 2;
len_dos = wcslen(DosPath) + 1;
NtPath = Dll_Alloc((File_MupLen + len_dos) * sizeof(WCHAR));
wmemcpy(NtPath, File_Mup, File_MupLen);
wmemcpy(NtPath + File_MupLen, DosPath, len_dos);
NtPath = File_ConcatPath2(File_Mup, File_MupLen, DosPath, wcslen(DosPath));

} else if (DosPath[0] != L'\\') {

Expand Down Expand Up @@ -815,10 +811,7 @@ _FX WCHAR *File_TranslateDosToNtPathForDatFile(const WCHAR *DosPath)
}

DosPath += path_pos;
len_dos = wcslen(DosPath) + 1;
NtPath = Dll_Alloc((drive->len + len_dos) * sizeof(WCHAR));
wmemcpy(NtPath, drive->path, drive->len);
wmemcpy(NtPath + drive->len, DosPath, len_dos);
NtPath = File_ConcatPath2(drive->path, drive->len, DosPath, wcslen(DosPath));

LeaveCriticalSection(File_DrivesAndLinks_CritSec);
}
Expand Down

0 comments on commit d99e556

Please sign in to comment.