Update file.c

This commit is contained in:
DavidXanatos 2022-01-29 20:38:26 +01:00
parent b3d8b6e599
commit 3dda65c852
1 changed files with 17 additions and 0 deletions

View File

@ -381,6 +381,23 @@ static ULONG File_Snapshot_Count = 0;
#include "file_init.c"
//---------------------------------------------------------------------------
// File_FindBoxPrefixLength
//---------------------------------------------------------------------------
_FX ULONG File_FindBoxPrefixLength(const WCHAR* CopyPath)
{
ULONG length = wcslen(CopyPath);
ULONG prefixLen = 0;
if (length >= Dll_BoxFilePathLen && 0 == Dll_NlsStrCmp(CopyPath, Dll_BoxFilePath, Dll_BoxFilePathLen))
prefixLen = Dll_BoxFilePathLen;
if (File_AltBoxPath && length >= File_AltBoxPathLen && 0 == Dll_NlsStrCmp(CopyPath, File_AltBoxPath, File_AltBoxPathLen))
prefixLen = File_AltBoxPathLen;
return prefixLen;
}
//---------------------------------------------------------------------------
// File_GetName
//---------------------------------------------------------------------------