Fixed issue with copy_file

from: https://forum.openmw.org/viewtopic.php?f=20&t=1718&hilit=0.26&start=50#p18705
This commit is contained in:
Tom Mason 2013-09-07 15:41:51 +01:00
parent 5a792b10b9
commit 2b50e34566

View file

@ -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());
}