]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(AD_pop_and_chdir): Call error here, now that restore_cwd no longer does it.
authorJim Meyering <jim@meyering.net>
Tue, 4 Mar 2003 21:30:27 +0000 (21:30 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 4 Mar 2003 21:30:27 +0000 (21:30 +0000)
src/remove.c

index 5c8e203d2b5fe86b79f92a427d58f1111365871a..36fe332f62be1fdcf0f4986c69fa6a3e2f3caeea 100644 (file)
@@ -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))