diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/idevicebackup2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 30e3724..2c77e1f 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c | |||
| @@ -1004,6 +1004,9 @@ static void mb2_handle_list_directory(plist_t message, const char *backup_dir) | |||
| 1004 | if (cur_dir) { | 1004 | if (cur_dir) { |
| 1005 | struct dirent* ep; | 1005 | struct dirent* ep; |
| 1006 | while ((ep = readdir(cur_dir))) { | 1006 | while ((ep = readdir(cur_dir))) { |
| 1007 | if ((strcmp(ep->d_name, ".") == 0) || (strcmp(ep->d_name, "..") == 0)) { | ||
| 1008 | continue; | ||
| 1009 | } | ||
| 1007 | char *fpath = build_path(path, ep->d_name, NULL); | 1010 | char *fpath = build_path(path, ep->d_name, NULL); |
| 1008 | if (fpath) { | 1011 | if (fpath) { |
| 1009 | plist_t fdict = plist_new_dict(); | 1012 | plist_t fdict = plist_new_dict(); |
| @@ -1122,6 +1125,9 @@ static void mb2_copy_directory_by_path(const char *src, const char *dst) | |||
| 1122 | if (cur_dir) { | 1125 | if (cur_dir) { |
| 1123 | struct dirent* ep; | 1126 | struct dirent* ep; |
| 1124 | while ((ep = readdir(cur_dir))) { | 1127 | while ((ep = readdir(cur_dir))) { |
| 1128 | if ((strcmp(ep->d_name, ".") == 0) || (strcmp(ep->d_name, "..") == 0)) { | ||
| 1129 | continue; | ||
| 1130 | } | ||
| 1125 | char *srcpath = build_path(src, ep->d_name, NULL); | 1131 | char *srcpath = build_path(src, ep->d_name, NULL); |
| 1126 | char *dstpath = build_path(dst, ep->d_name, NULL); | 1132 | char *dstpath = build_path(dst, ep->d_name, NULL); |
| 1127 | if (srcpath && dstpath) { | 1133 | if (srcpath && dstpath) { |
