1 // Windows/FileName.cpp 2 3 #include "StdAfx.h" 4 5 #include "FileName.h" 6 7 namespace NWindows { 8 namespace NFile { 9 namespace NName { 10 NormalizeDirPathPrefix(FString & dirPath)11void NormalizeDirPathPrefix(FString &dirPath) 12 { 13 if (dirPath.IsEmpty()) 14 return; 15 if (dirPath.ReverseFind(FCHAR_PATH_SEPARATOR) != dirPath.Length() - 1) 16 dirPath += FCHAR_PATH_SEPARATOR; 17 } 18 19 #ifndef USE_UNICODE_FSTRING NormalizeDirPathPrefix(UString & dirPath)20void NormalizeDirPathPrefix(UString &dirPath) 21 { 22 if (dirPath.IsEmpty()) 23 return; 24 if (dirPath.ReverseFind(WCHAR_PATH_SEPARATOR) != dirPath.Length() - 1) 25 dirPath += WCHAR_PATH_SEPARATOR; 26 } 27 #endif 28 29 }}} 30