diff --git a/Source/Common/path.cpp b/Source/Common/path.cpp index 0fc797bdf..7d4a2f381 100644 --- a/Source/Common/path.cpp +++ b/Source/Common/path.cpp @@ -587,6 +587,11 @@ void CPath::SetComponents(const char * lpszDrive, const char * lpszDirectory, co char buff_fullname[MAX_PATH]; memset(buff_fullname, 0, sizeof(buff_fullname)); + if (lpszDirectory == NULL || strlen(lpszDirectory) == 0) + { + static char empty_dir[] = { DIRECTORY_DELIMITER, '\0' }; + lpszDirectory = empty_dir; + } _makepath(buff_fullname, lpszDrive, lpszDirectory, lpszName, lpszExtension); m_strPath.erase();