From d0dbe3b65d479436d881f0af2d6d071044ec8ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 29 Mar 2013 19:12:55 -0300 Subject: Set THANDY_HOME and properly copy files from the updates dir --- src/launcher.py | 3 +++ src/main.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/launcher.py b/src/launcher.py index 328c965..979f388 100644 --- a/src/launcher.py +++ b/src/launcher.py @@ -10,6 +10,9 @@ class Thandy(threading.Thread): def run(self): while True: try: + os.environ["THANDY_HOME"] = os.path.join(os.getcwd(), + "config", + "thandy") os.environ["THP_DB_ROOT"] = os.path.join(os.getcwd(), "packages") os.environ["THP_INSTALL_ROOT"] = os.path.join(os.getcwd(), diff --git a/src/main.cpp b/src/main.cpp index 7b99470..1ebbad8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,7 +33,12 @@ mergeDirectories(const fs::path &source, if (fs::is_regular_file(dir_iter->status())) { auto destFilePath = dest / dir_iter->path().filename(); - copy_file(dir_iter->path(), destFilePath, fs::copy_option::overwrite_if_exists); + std::cout << "copy_file " << dir_iter->path() << " to " << destFilePath << std::endl; + if (fs::exists(destFilePath)) + { + fs::remove(destFilePath); + } + copy_file(dir_iter->path(), destFilePath); } else if (fs::is_directory(dir_iter->status())) { -- cgit v1.2.3