Do the check that gExePath is not a directory (before deleting it) also in release builds.

This commit is contained in:
Johan Engelen 2016-07-27 19:47:51 +02:00
parent 70c23125cf
commit 0fcd50fb0d

View file

@ -770,11 +770,7 @@ int createStaticLibrary() {
//////////////////////////////////////////////////////////////////////////////
void deleteExecutable() {
if (!gExePath.empty()) {
// assert(gExePath.isValid());
bool is_directory;
assert(!(!llvm::sys::fs::is_directory(gExePath, is_directory) &&
is_directory));
if (!gExePath.empty() && !llvm::sys::fs::is_directory(gExePath)) {
llvm::sys::fs::remove(gExePath);
}
}