summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Touceda <chiiph@leap.se>2013-04-09 16:53:53 -0300
committerTomas Touceda <chiiph@leap.se>2013-04-09 16:53:53 -0300
commit28ce0c44e7995e7e4629c1fa33f0f1793ba7bfaf (patch)
tree3b9513d42ad4f1d6318032590be15973a031e667
parent5a563871fed7c7a368a3aad9bece0c6b469d2234 (diff)
Ensure events server from the launcher and change the renaming for windows
-rw-r--r--src/launcher.py4
-rw-r--r--src/main.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/launcher.py b/src/launcher.py
index 8b6c9a2..7d95336 100644
--- a/src/launcher.py
+++ b/src/launcher.py
@@ -4,6 +4,8 @@ import time
import threading
from leap.app import main as leap_client
+from leap.common.events import server
+
from thandy.ClientCLI import update as thandy_update
@@ -37,6 +39,8 @@ class Thandy(threading.Thread):
if __name__ == "__main__":
+ server.ensure_server(port=8090)
+
thandy_thread = Thandy()
thandy_thread.daemon = True
thandy_thread.start()
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);
}