summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-03-29 19:12:55 -0300
committerTomás Touceda <chiiph@leap.se>2013-03-29 19:12:55 -0300
commitd0dbe3b65d479436d881f0af2d6d071044ec8ff2 (patch)
tree61f20b85c6ac3b421fa20b5e6c275275408b29cc /src/main.cpp
parentd8ec60d6d013fdd7e72861e823a908bc6c9a3704 (diff)
Set THANDY_HOME and properly copy files from the updates dir
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 6 insertions, 1 deletions
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()))
{