mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Sanity check — can't create a directory with an empty path
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user