Sanity check — can't create a directory with an empty path

This commit is contained in:
Alexey Prokhin
2011-12-02 13:59:49 +04:00
parent 5e0a2b7761
commit 250d8ed214

View File

@@ -266,7 +266,7 @@ int linkObjToExecutable(const char* argv0)
// create path to exe
llvm::sys::Path exedir(llvm::sys::path::parent_path(gExePath.str()));
if (!llvm::sys::fs::exists(exedir.str()))
if (!exedir.empty() && !llvm::sys::fs::exists(exedir.str()))
{
exedir.createDirectoryOnDisk(true, &errstr);
if (!errstr.empty())