[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] unzip: -d should create the dir
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2020-04-29 12:38:07
Message-ID: CAK1hOcOrTMFvb8q9iK2WfHHO=tozW6Xm=dqKEpYhAPkRP8VU_A () mail ! gmail ! com
[Download RAW message or body]

Applied, thanks!

On Wed, Apr 15, 2020 at 2:01 PM Lauri Kasanen <cand@gmx.com> wrote:
>
> The official Info-Zip unzip creates the dir if it doesn't exist.
>
> Signed-off-by: Lauri Kasanen <cand@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@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic