along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* Extracted from rm.c and librarified by Jim Meyering. */
+/* Extracted from rm.c and librarified, then rewritten by Jim Meyering. */
#ifdef _AIX
#pragma alloca
#else
+ if (is_dir == T_YES && ! x->recursive)
+ {
+ error (0, EISDIR, _("cannot remove directory %s"),
+ quote (full_filename (filename)));
+ return RM_ERROR;
+ }
+
/* is_empty_directory is set iff it's ok to use rmdir.
Note that it's set only in interactive mode -- in which case it's
an optimization that arranges so that the user is asked just