diff options
author | Martin Nowack <martin@se.inf.tu-dresden.de> | 2014-04-15 14:36:59 +0200 |
---|---|---|
committer | Martin Nowack <martin@se.inf.tu-dresden.de> | 2014-04-15 14:36:59 +0200 |
commit | 78e06cb737e3e54e6c7035822f39961679e7b367 (patch) | |
tree | 69bcaf2485b5b0dcecc32002de9335b667f65d0b /tools | |
parent | 60ebbf13d6b6d3522008a7b0553e5bfec1864c71 (diff) | |
download | klee-78e06cb737e3e54e6c7035822f39961679e7b367.tar.gz |
Fix handling of path name creation.
If directory has no trailing slash, the slash is not addedd if concatenated
Diffstat (limited to 'tools')
-rw-r--r-- | tools/klee/main.cpp | 6 |
1 files 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-<i>" - 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) { |