summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/idevicebackup2.c')
-rw-r--r--tools/idevicebackup2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index a0ffc9b..697e276 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -47,6 +47,7 @@
47 47
48#ifdef WIN32 48#ifdef WIN32
49#include <windows.h> 49#include <windows.h>
50#include <conio.h>
50#define sleep(x) Sleep(x*1000) 51#define sleep(x) Sleep(x*1000)
51#else 52#else
52#include <termios.h> 53#include <termios.h>
@@ -1968,7 +1969,6 @@ checkpoint:
1968 char *oldpath = build_path(backup_directory, key, NULL); 1969 char *oldpath = build_path(backup_directory, key, NULL);
1969 1970
1970#ifdef WIN32 1971#ifdef WIN32
1971 struct stat st;
1972 if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode)) 1972 if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode))
1973 RemoveDirectory(newpath); 1973 RemoveDirectory(newpath);
1974 else 1974 else
@@ -2023,7 +2023,6 @@ checkpoint:
2023 char *newpath = build_path(backup_directory, str, NULL); 2023 char *newpath = build_path(backup_directory, str, NULL);
2024 free(str); 2024 free(str);
2025#ifdef WIN32 2025#ifdef WIN32
2026 struct stat st;
2027 int res = 0; 2026 int res = 0;
2028 if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode)) 2027 if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode))
2029 res = RemoveDirectory(newpath); 2028 res = RemoveDirectory(newpath);