Restore working directory. */ \
if (do_chdir) \
{ \
- int _fail = restore_cwd (&cwd, NULL, NULL); \
+ if (restore_cwd (&cwd) != 0) \
+ { \
+ int _saved_errno = errno; \
+ error (0, errno, \
+ _("failed to return to initial working directory")); \
+ free_cwd (&cwd); \
+ errno = _saved_errno; \
+ return 1; \
+ } \
free_cwd (&cwd); \
- if (_fail) \
- return 1; \
} \
} \
while (0)
*(p->dirname_end) = '\0';
if (chmod (dirpath, parent_mode))
{
- error (0, errno, "cannot change permissions of %s",
+ error (0, errno, _("cannot change permissions of %s"),
quote (dirpath));
retval = 1;
}