Don't ask when removing symlinks.
authorJim Meyering <jim@meyering.net>
Thu, 18 Feb 1993 18:24:15 +0000 (18:24 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 18 Feb 1993 18:24:15 +0000 (18:24 +0000)
src/rm.c

index bcf28a4..0d0ce7c 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -194,7 +194,11 @@ remove_file (statp)
      struct stat *statp;
 {
   if (!ignore_missing_files && (interactive || stdin_tty)
-      && eaccess_stat (statp, W_OK))
+      && eaccess_stat (statp, W_OK)
+#ifdef S_ISLNK
+      && !S_ISLNK (statp->st_mode)
+#endif
+      )
     {
       fprintf (stderr, "%s: remove %s`%s', overriding mode %04o? ",
               program_name,