The official Info-Zip unzip creates the dir if it doesn't exist.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
}
/* Change dir if necessary */
- if (base_dir)
+ if (base_dir) {
+ /* -p DIR: try to create, errors don't matter.
+ * UnZip 6.00 does no multi-level mkdir (-p DIR1/DIR2 syntax),
+ * not using bb_make_directory() here (yet?)
+ */
+ mkdir(base_dir, 0777);
xchdir(base_dir);
+ }
if (quiet <= 1) { /* not -qq */
if (quiet == 0) {