When reporting failure to change/save directory, mention its name.

* find/exec.c (prep_child_for_exec): When issuing an error message
about a failure to change directory, mention the directory.
* find/util.c (record_initial_cwd): Do the same when saving the
initial working directory.
(cleanup_initial_cwd): Also when restoring the initial working
directory.
This commit is contained in:
Sami Kerola 2014-08-17 12:48:54 +01:00 committed by James Youngman
parent d56af2e2d5
commit 7f3af09ef1
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,13 @@
2014-08-21 Sami Kerola <kerolasa@iki.fi> (tiny change)
When reporting failure to change/save directory, mention its name.
* find/exec.c (prep_child_for_exec): When issuing an error message
about a failure to change directory, mention the directory.
* find/util.c (record_initial_cwd): Do the same when saving the
initial working directory.
(cleanup_initial_cwd): Also when restoring the initial working
directory.
2014-08-19 James Youngman <jay@gnu.org>
Fix bug #42903: the print statement doesn't exist in Python 3.

View File

@ -282,7 +282,7 @@ prep_child_for_exec (bool close_stdin, const struct saved_cwd *wd)
*/
if (0 != restore_cwd (wd))
{
error (0, errno, _("Failed to change directory"));
error (0, errno, _("Failed to change directory: %s"), wd);
ok = false;
}
return ok;

View File

@ -456,7 +456,7 @@ record_initial_cwd (void)
if (0 != save_cwd (initial_wd))
{
error (EXIT_FAILURE, errno,
_("failed to save initial working directory"));
_("failed to save initial working directory: %s"), initial_wd);
}
}
@ -473,7 +473,7 @@ cleanup_initial_cwd (void)
{
/* since we may already be in atexit, die with _exit(). */
error (0, errno,
_("failed to restore initial working directory"));
_("failed to restore initial working directory: %s"), initial_wd);
_exit (EXIT_FAILURE);
}
}