diff options
author | Tomas Touceda <chiiph@leap.se> | 2013-04-09 16:53:53 -0300 |
---|---|---|
committer | Tomas Touceda <chiiph@leap.se> | 2013-04-09 16:53:53 -0300 |
commit | 28ce0c44e7995e7e4629c1fa33f0f1793ba7bfaf (patch) | |
tree | 3b9513d42ad4f1d6318032590be15973a031e667 /src/main.cpp | |
parent | 5a563871fed7c7a368a3aad9bece0c6b469d2234 (diff) |
Ensure events server from the launcher and change the renaming for windows
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index ca066cd..a2a3fcf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,7 +30,7 @@ removeTemps(const std::string source = ".") if (fs::is_regular_file(dir_iter->status())) { auto filename = dir_iter->path().filename(); - if (boost::starts_with(filename.string(), TEMP_PREFIX)) + if (boost::ends_with(filename.string(), TEMP_PREFIX)) { std::cout << "remove " << dir_iter->path() << std::endl; fs::remove(dir_iter->path()); @@ -71,7 +71,7 @@ mergeDirectories(const fs::path &source, if (fs::exists(destFilePath)) { // On windows we can't remove, but we can rename and afterwards remove - auto tempFilePath = dest / fs::path("__tmp_" + filename.string()); + auto tempFilePath = dest / fs::path(filename.string() + TEMP_PREFIX); //fs::remove(destFilePath); fs::rename(destFilePath, tempFilePath); } |