Cygwin: utils: chattr: do not default to CWD

Drop the unexpected behaviour to run chattr in the CWD if no file has
been specified on the command line.  Bail out with usage info instead.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2021-05-20 22:39:22 +02:00
parent f8eecf22db
commit 3053632389
1 changed files with 3 additions and 6 deletions

View File

@ -320,12 +320,9 @@ next:
if (sanity_check ())
return 1;
if (optind > argc - 1)
{
chattr (".");
if (Ropt)
chattr_dir (".");
}
else for (; optind < argc; ++optind)
usage (stderr);
for (; optind < argc; ++optind)
{
struct stat st;