[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Info-mtools] [PATCH] Fix mattrib does not work
From: |
zhanghongtao (A) |
Subject: |
[Info-mtools] [PATCH] Fix mattrib does not work |
Date: |
Tue, 14 Mar 2023 17:07:57 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 |
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.
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
- [Info-mtools] [PATCH] Fix mattrib does not work,
zhanghongtao (A) <=