Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/bin/rmdir Pull up following revision(s) (requested by gin...
details: https://anonhg.NetBSD.org/src/rev/e83e4d29720c
branches: netbsd-6
changeset: 777230:e83e4d29720c
user: snj <snj%NetBSD.org@localhost>
date: Sat Aug 19 05:25:27 2017 +0000
description:
Pull up following revision(s) (requested by ginsbach in ticket #1490):
bin/rmdir/rmdir.c: revision 1.27
PR/48182: Fix rmdir -p handling of top-level (root) directory.
diffstat:
bin/rmdir/rmdir.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 967f8a83f3c8 -r e83e4d29720c bin/rmdir/rmdir.c
--- a/bin/rmdir/rmdir.c Sat Aug 19 05:06:56 2017 +0000
+++ b/bin/rmdir/rmdir.c Sat Aug 19 05:25:27 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rmdir.c,v 1.26 2011/08/29 14:49:38 joerg Exp $ */
+/* $NetBSD: rmdir.c,v 1.26.4.1 2017/08/19 05:25:27 snj Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)rmdir.c 8.3 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: rmdir.c,v 1.26 2011/08/29 14:49:38 joerg Exp $");
+__RCSID("$NetBSD: rmdir.c,v 1.26.4.1 2017/08/19 05:25:27 snj Exp $");
#endif
#endif /* not lint */
@@ -103,6 +103,10 @@
/* Ignore trailing '/' on deleted name */
continue;
+ if (*path == 0)
+ /* At top level (root) directory */
+ break;
+
if (rmdir(path) < 0) {
warn("%s", path);
return (1);
Home |
Main Index |
Thread Index |
Old Index