From 2b50e3456662a7434706b3a1eca01069cba70b21 Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Sat, 7 Sep 2013 15:41:51 +0100 Subject: [PATCH] Fixed issue with copy_file from: https://forum.openmw.org/viewtopic.php?f=20&t=1718&hilit=0.26&start=50#p18705 --- apps/launcher/unshieldthread.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/launcher/unshieldthread.cpp b/apps/launcher/unshieldthread.cpp index ab9d984e1..ea293b29d 100644 --- a/apps/launcher/unshieldthread.cpp +++ b/apps/launcher/unshieldthread.cpp @@ -216,7 +216,12 @@ namespace else { if(copy) - bfs::copy_file(dir->path(), to / dir->path().filename()); + { + bfs::path dest = to / dir->path().filename(); + if(bfs::exists(dest)) + bfs::remove_all(dest); + bfs::copy_file(dir->path(), dest); + } else bfs::rename(dir->path(), to / dir->path().filename()); }