[PATCH] unzip: -d should create the dir

Denys Vlasenko vda.linux at googlemail.com
Wed Apr 29 12:38:07 UTC 2020


Applied, thanks!

On Wed, Apr 15, 2020 at 2:01 PM Lauri Kasanen <cand at gmx.com> wrote:
>
> The official Info-Zip unzip creates the dir if it doesn't exist.
>
> Signed-off-by: Lauri Kasanen <cand at gmx.com>
> ---
>  archival/unzip.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/archival/unzip.c b/archival/unzip.c
> index 8c4cb98..45e0727 100644
> --- a/archival/unzip.c
> +++ b/archival/unzip.c
> @@ -646,8 +646,10 @@ int unzip_main(int argc, char **argv)
>         }
>
>         /* Change dir if necessary */
> -       if (base_dir)
> +       if (base_dir) {
> +               mkdir(base_dir, 0777); /* Try to create, errors don't matter */
>                 xchdir(base_dir);
> +       }
>
>         if (quiet <= 1) { /* not -qq */
>                 if (quiet == 0) {
> --
> 2.6.2
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list