]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(remove_dir): Give a diagnostic upon failed save_cwd,
authorJim Meyering <jim@meyering.net>
Sat, 12 Jul 2003 16:22:39 +0000 (16:22 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 12 Jul 2003 16:22:39 +0000 (16:22 +0000)
now that that function no longer calls `error'.

src/remove.c

index 645dedfc0562d29848b6d2cf1e6b2d34fc1a4341..ed9938429977fbddd421daa972988e5c8d19db8a 100644 (file)
@@ -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 ();
     }