X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgtpkg-zip.c;h=8fe17c4600e81e936f69a4eb4bfaf883327d20ec;hb=7d6a4222f3c4fda1ea2d69ae057ba7cc31343ffe;hp=916d0cd0b6fa98ba99222486eaa15e0a549367d7;hpb=50dd441a11440201e1da9da81a7103677e2282ad;p=src%2Fapp-framework-main.git diff --git a/src/wgtpkg-zip.c b/src/wgtpkg-zip.c index 916d0cd..8fe17c4 100644 --- a/src/wgtpkg-zip.c +++ b/src/wgtpkg-zip.c @@ -150,20 +150,10 @@ int zread(const char *zipfile, unsigned long long maxsize) ERROR("empty entry found in %s", zipfile); goto error; } - if (zstat.size == 0) { - /* directory name */ - if (zstat.name[len - 1] != '/') { - ERROR("bad directory name %s in %s", zstat.name, zipfile); - goto error; - } + if (zstat.name[len - 1] == '/') /* record */ fdesc = file_add_directory(zstat.name); - } else { - /* directory name */ - if (zstat.name[len - 1] == '/') { - ERROR("bad file name %s in %s", zstat.name, zipfile); - goto error; - } + else { /* get the size */ esize += zstat.size; /* record */