diff options
Diffstat (limited to 'src/chown-core.c')
-rw-r--r-- | src/chown-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chown-core.c b/src/chown-core.c index dbd3e52d8..d1efe52b6 100644 --- a/src/chown-core.c +++ b/src/chown-core.c @@ -318,7 +318,7 @@ change_file_owner (FTS *fts, FTSENT *ent, stat it to get info on the referent. */ if (S_ISLNK (file_stats->st_mode) && chopt->affect_symlink_referent) { - if (stat (file, &stat_buf) != 0) + if (fstatat (fts->fts_cwd_fd, file, &stat_buf, 0) != 0) { error (0, errno, _("cannot dereference %s"), quote (file_full_name)); |