summaryrefslogtreecommitdiff
path: root/src/remove.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-04 21:30:27 +0000
committerJim Meyering <jim@meyering.net>2003-03-04 21:30:27 +0000
commite628a56597540dd563d8d988afcdb0d1720f1523 (patch)
tree6238afe5cb1945574ad972b933e922b8f57c5313 /src/remove.c
parent5ef70ce637cc76c4c3c5e1a7d0ba06f2ad3f8317 (diff)
downloadcoreutils-e628a56597540dd563d8d988afcdb0d1720f1523.tar.xz
(AD_pop_and_chdir): Call error here, now that restore_cwd no longer does it.
Diffstat (limited to 'src/remove.c')
-rw-r--r--src/remove.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/remove.c b/src/remove.c
index 5c8e203d2..36fe332f6 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -397,8 +397,9 @@ AD_pop_and_chdir (Dirstack_state *ds)
}
else
{
- if (restore_cwd (&top->u.saved_cwd, NULL, NULL))
- exit (EXIT_FAILURE);
+ if (restore_cwd (&top->u.saved_cwd))
+ error (EXIT_FAILURE, errno,
+ _("failed to return to initial working directory"));
}
if (lstat (".", &sb))