From: Jim Meyering Date: Sat, 12 Jul 2003 16:22:39 +0000 (+0000) Subject: (remove_dir): Give a diagnostic upon failed save_cwd, X-Git-Tag: v5.0.1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f78b3f40f06e50649edbaf223077c8f49682125;p=thirdparty%2Fcoreutils.git (remove_dir): Give a diagnostic upon failed save_cwd, now that that function no longer calls `error'. --- diff --git a/src/remove.c b/src/remove.c index 645dedfc05..ed99384299 100644 --- a/src/remove.c +++ b/src/remove.c @@ -976,7 +976,10 @@ remove_dir (Dirstack_state *ds, char const *dir, struct saved_cwd **cwd_state, { *cwd_state = XMALLOC (struct saved_cwd, 1); if (save_cwd (*cwd_state)) - return RM_ERROR; + { + error (0, errno, _("cannot get current directory")); + return RM_ERROR; + } AD_push_initial (ds, *cwd_state); AD_INIT_OTHER_MEMBERS (); }