From 78e06cb737e3e54e6c7035822f39961679e7b367 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Tue, 15 Apr 2014 14:36:59 +0200 Subject: Fix handling of path name creation. If directory has no trailing slash, the slash is not addedd if concatenated --- tools/klee/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp index f521e299..a2268c83 100644 --- a/tools/klee/main.cpp +++ b/tools/klee/main.cpp @@ -294,11 +294,11 @@ KleeHandler::KleeHandler(int argc, char **argv) m_outputDirectory = directory; } else { // "klee-out-" - SmallString<128> d; - raw_svector_ostream ds(d); int i = 0; for (; i <= INT_MAX; ++i) { - d.clear(); ds << directory << "klee-out-" << i; ds.flush(); + SmallString<128> d(directory); + llvm::sys::path::append(d, "klee-out-"); + raw_svector_ostream ds(d); ds << i; ds.flush(); // create directory and try to link klee-last if (mkdir(d.c_str(), 0775) == 0) { -- cgit 1.4.1