diff options
author | Jim Meyering <jim@meyering.net> | 2003-01-21 18:49:49 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-01-21 18:49:49 +0000 |
commit | c59a8e2d32e25ab8807335dbb2d34f19b23e2825 (patch) | |
tree | 4f93165a71359be7281714151a76f3fb0ca0bcce | |
parent | 2b2a4a83def56950e5febd5498a8b13f8982cda1 (diff) | |
download | coreutils-c59a8e2d32e25ab8807335dbb2d34f19b23e2825.tar.xz |
(remove_entry) [ROOT_CAN_UNLINK_DIRS && HAVE_STRUCT_DIRENT_D_TYPE]: If a file
has d_type == DT_UNKNOWN it may still be a directory -- or not (e.g., with
FreeBSD on an NFS-mounted file system), so resort to calling lstat to find out.
-rw-r--r-- | src/remove.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/remove.c b/src/remove.c index 95e331a84..e9223fd53 100644 --- a/src/remove.c +++ b/src/remove.c @@ -695,7 +695,7 @@ remove_entry (Dirstack_state const *ds, char const *filename, if (is_dir == T_UNKNOWN) { # if HAVE_STRUCT_DIRENT_D_TYPE - if (dp) + if (dp && dp->d_type != DT_UNKNOWN) is_dir = DT_IS_DIR (dp) ? T_YES : T_NO; else # endif |