Fix unexpected exception in Utility::DirName when specifying an empty path

refs #9263
This commit is contained in:
Gunnar Beutner 2015-06-15 14:04:38 +02:00
parent a0f7aa4fe6
commit cfcb8675c7
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ String Utility::DirName(const String& path)
#ifndef _WIN32
result = dirname(dir);
#else /* _WIN32 */
if (!PathRemoveFileSpec(dir)) {
if (dir[0] != 0 && !PathRemoveFileSpec(dir)) {
free(dir);
BOOST_THROW_EXCEPTION(win32_error()