info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-mtools] [PATCH] Fix mattrib does not work


From: Alain Knaff
Subject: Re: [Info-mtools] [PATCH] Fix mattrib does not work
Date: Tue, 21 Mar 2023 23:52:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

Hi,

On 14/03/2023 10:07, zhanghongtao (A) via Info-mtools wrote:
> Subject: [PATCH] Fix mattrib does not work
> 
> For example:
> 
> #mattrib +r tmp_dos_test
> #echo $?
> 0
> #mattrib tmp_dos_test
>   A          A:/tmp_dos_test
> 
> mattrib didn't work.
> We found that the judgment in the attrib_file function was incorrect.

Thanks for the patch, this is now part of the new 4.0.43 release of mtools.


> 
> Signed-off-by: Hongtao Zhang <zhanghongtao22@huawei.com>
> ---
>  mattrib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mattrib.c b/mattrib.c
> index 29ef1da..e5cac78 100644
> --- a/mattrib.c
> +++ b/mattrib.c
> @@ -34,7 +34,7 @@ static int attrib_file(direntry_t *entry, MainParam_t *mp)
>  {
>         Arg_t *arg=(Arg_t *) mp->arg;
> 
> -       if(isRootEntry(entry)) {
> +       if(!isRootEntry(entry)) {
>                 /* if not root directory, change it */
>                 entry->dir.attr = (entry->dir.attr & arg->remove) | arg->add;
>                 dir_write(entry);
> --
> 2.39.1
> 

Thanks,

Alain



reply via email to

[Prev in Thread] Current Thread [Next in Thread]