mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
chmod: don't ignore a dangling symlink
* NEWS: Mention the bug fix. * src/chmod.c (process_file): Handle the case of FTS_SLNONE, i.e., give a diagnostic saying we cannot operate on such a file. * tests/chmod/thru-dangling: Compare new stderr output with expected.
This commit is contained in:
1 parent
e70487cda7
commit
500eccdbe4
4 files changed
+23
-2
No files matched your search
+6
-1
@@ -1,5 +1,5 @@
|
||||
/* chmod -- change permission modes of files
|
||||
Copyright (C) 89, 90, 91, 1995-2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 89, 90, 91, 1995-2007 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -220,6 +220,11 @@ process_file (FTS *fts, FTSENT *ent)
|
||||
ok = false;
|
||||
break;
|
||||
|
||||
case FTS_SLNONE:
|
||||
error (0, 0, _("cannot operate on dangling symlink %s"),
|
||||
quote (file_full_name));
|
||||
ok = false;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user