Thanks. I have applied the patch, but unfortunately I had to modify it before applying it, to add a ChangeLog entry (please see README-hacking). The resulting patch is attached (and applied to master).
Also as explained in README-hacking, if you plan to make further improvements to findutils - and I hope you will - you will need to make a copyright asssignment. Thanks for your help so far! James.
From 7f3af09ef1f49ca1e98a19edb3ffa4405ac94231 Mon Sep 17 00:00:00 2001 From: Sami Kerola <kerol...@iki.fi> Date: Sun, 17 Aug 2014 12:48:54 +0100 Subject: [PATCH] When reporting failure to change/save directory, mention its name. To: findutils-patc...@gnu.org * 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. --- ChangeLog | 10 ++++++++++ find/exec.c | 2 +- find/util.c | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ba2555..291ca1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2014-08-21 Sami Kerola <kerol...@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 <j...@gnu.org> Fix bug #42903: the print statement doesn't exist in Python 3. diff --git a/find/exec.c b/find/exec.c index 06394f1..a57b6d4 100644 --- a/find/exec.c +++ b/find/exec.c @@ -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; diff --git a/find/util.c b/find/util.c index d603fc7..eb5efa2 100644 --- a/find/util.c +++ b/find/util.c @@ -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); } } -- 1.7.10.4