Cygwin: utils: chattr: fix recursive behaviour
chattr [mode] dir incorrectly recurses one level into the given directory, even if the --recursive option has not been used. This patch adds a test to avoid this bug. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
cb674a4ad1
commit
f8eecf22db
|
@ -347,7 +347,7 @@ next:
|
||||||
{
|
{
|
||||||
if (chattr (argv[optind]))
|
if (chattr (argv[optind]))
|
||||||
ret = 1;
|
ret = 1;
|
||||||
if (S_ISDIR (st.st_mode) && chattr_dir (argv[optind]))
|
if (S_ISDIR (st.st_mode) && Ropt && chattr_dir (argv[optind]))
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue