From 250d8ed2146c2657caa3563adcb6071b2a401d8f Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Fri, 2 Dec 2011 13:59:49 +0400 Subject: [PATCH] =?UTF-8?q?Sanity=20check=20=E2=80=94=20can't=20create=20a?= =?UTF-8?q?=20directory=20with=20an=20empty=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gen/linker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/linker.cpp b/gen/linker.cpp index 1be12301..24874e50 100644 --- a/gen/linker.cpp +++ b/gen/linker.cpp @@ -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())