summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2016-08-12 20:06:07 +0200
committerGravatar Nikias Bassen2016-08-12 20:06:07 +0200
commit442f670a01f82c63d1316d60f1f47191b8bc6b5a (patch)
tree7c31632bde9b92cdd4e623f7331ae85748779b5e
parent824bb9ae64887d710fc69afff102056d180322ff (diff)
downloadideviceinstaller-442f670a01f82c63d1316d60f1f47191b8bc6b5a.tar.gz
ideviceinstaller-442f670a01f82c63d1316d60f1f47191b8bc6b5a.tar.bz2
Ignore .DS_Store files and other hidden files when parsing Zip files
-rw-r--r--src/ideviceinstaller.c4
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)
/* check if we have a "Payload/.../" name */
len = strlen(name);
if (!strncmp(name, "Payload/", 8) && (len > 8)) {
+ /* skip hidden files */
+ if (name[8] == '.')
+ continue;
+
/* locate the second directory delimiter */
const char* p = name + 8;
do {