From eaef2e8dcf87d35a3fbfe6f1af240ccfe0097717 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Fri, 10 Jun 2016 16:46:50 +0200 Subject: [PATCH] Remove half-copied files --- source/fs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/fs.c b/source/fs.c index 9a243d6..729664d 100644 --- a/source/fs.c +++ b/source/fs.c @@ -457,6 +457,7 @@ bool PathCopyVirtual(const char* destdir, const char* orig) { } ShowProgress(1, 1, orig); f_close(&dfile); + if (!ret) f_unlink(dest); } else { return false; } @@ -596,6 +597,7 @@ bool PathCopyWorker(char* dest, char* orig, bool overwrite, bool move) { f_close(&ofile); f_close(&dfile); + if (!ret) f_unlink(dest); } *(--dname) = '\0';