diff options
author | Jim Meyering <jim@meyering.net> | 2006-01-17 17:25:42 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-01-17 17:25:42 +0000 |
commit | c97a36e2d9ff86871bf40b2670149f647ccc958a (patch) | |
tree | b873716f366c7938944d59712c2ac5518b6c0fd3 | |
parent | e9f0c42afcee2105e5947715128f55419411328f (diff) | |
download | coreutils-c97a36e2d9ff86871bf40b2670149f647ccc958a.tar.xz |
Now that fts no longer changes the current working directory, adjust
its clients accordingly -- note that du.c uses fts but doesn't need
any adjustment, since it doesn't operate on the actual files,
but rather just uses the stat buffers provided by fts.
Include "openat.h".
(process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
-rw-r--r-- | src/chmod.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chmod.c b/src/chmod.c index ac3d8c7b8..098118c18 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -28,6 +28,7 @@ #include "error.h" #include "filemode.h" #include "modechange.h" +#include "openat.h" #include "quote.h" #include "quotearg.h" #include "root-dev-ino.h" @@ -225,7 +226,7 @@ process_file (FTS *fts, FTSENT *ent) if (! S_ISLNK (old_mode)) { - if (chmod (file, new_mode) == 0) + if (chmodat (fts->fts_cwd_fd, file, new_mode) == 0) chmod_succeeded = true; else { |