summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar BALATON Zoltan2014-10-17 00:16:40 +0200
committerGravatar BALATON Zoltan2014-10-21 01:15:31 +0200
commit9d44bcf451bf295ee5334233d77a7e80867df999 (patch)
tree4f8abc13255a83891198299b586766654b14c95f
parentd7b4e8b4409b5475f709e8fed7b744e0821c518d (diff)
downloadidevicerestore-9d44bcf451bf295ee5334233d77a7e80867df999.tar.gz
idevicerestore-9d44bcf451bf295ee5334233d77a7e80867df999.tar.bz2
Remove destination before moving a file to it as it can fail on some systems otherwise.
-rw-r--r--src/idevicerestore.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 8625176..ed984d9 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -737,6 +737,7 @@ int idevicerestore_start(struct idevicerestore_client_t* client)
if (strstr(filesystem, ".extract")) {
// rename <fsname>.extract to <fsname>
+ remove(tmpf);
rename(filesystem, tmpf);
free(filesystem);
filesystem = strdup(tmpf);