diff options
| author | 2016-08-12 20:06:07 +0200 | |
|---|---|---|
| committer | 2016-08-12 20:06:07 +0200 | |
| commit | 442f670a01f82c63d1316d60f1f47191b8bc6b5a (patch) | |
| tree | 7c31632bde9b92cdd4e623f7331ae85748779b5e /src/ideviceinstaller.c | |
| parent | 824bb9ae64887d710fc69afff102056d180322ff (diff) | |
| download | ideviceinstaller-442f670a01f82c63d1316d60f1f47191b8bc6b5a.tar.gz ideviceinstaller-442f670a01f82c63d1316d60f1f47191b8bc6b5a.tar.bz2 | |
Ignore .DS_Store files and other hidden files when parsing Zip files
Diffstat (limited to 'src/ideviceinstaller.c')
| -rw-r--r-- | src/ideviceinstaller.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index f70ba25..0f9cc99 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c | |||
| @@ -289,6 +289,10 @@ static int zip_get_app_directory(struct zip* zf, char** path) | |||
| 289 | /* check if we have a "Payload/.../" name */ | 289 | /* check if we have a "Payload/.../" name */ |
| 290 | len = strlen(name); | 290 | len = strlen(name); |
| 291 | if (!strncmp(name, "Payload/", 8) && (len > 8)) { | 291 | if (!strncmp(name, "Payload/", 8) && (len > 8)) { |
| 292 | /* skip hidden files */ | ||
| 293 | if (name[8] == '.') | ||
| 294 | continue; | ||
| 295 | |||
| 292 | /* locate the second directory delimiter */ | 296 | /* locate the second directory delimiter */ |
| 293 | const char* p = name + 8; | 297 | const char* p = name + 8; |
| 294 | do { | 298 | do { |
