From faf0865a94b424f694cf6e3a8f07604d83abb77a Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 15 Jun 2015 14:04:38 +0200 Subject: [PATCH] Fix unexpected exception in Utility::DirName when specifying an empty path refs #9263 --- lib/base/utility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp index 5fdf25468..6287920aa 100644 --- a/lib/base/utility.cpp +++ b/lib/base/utility.cpp @@ -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() -- 2.40.0