projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c08bfe
)
(CLEANUP_CWD): Call error here, now that restore_cwd no longer does it.
author
Jim Meyering
<jim@meyering.net>
Tue, 4 Mar 2003 21:29:13 +0000
(21:29 +0000)
committer
Jim Meyering
<jim@meyering.net>
Tue, 4 Mar 2003 21:29:13 +0000
(21:29 +0000)
lib/makepath.c
patch
|
blob
|
history
diff --git
a/lib/makepath.c
b/lib/makepath.c
index a725e8597a6698fdfd1ad899825589f3af2aa73f..70038be7814c6d5948ed30a668721ccd01f34dc1 100644
(file)
--- a/
lib/makepath.c
+++ b/
lib/makepath.c
@@
-117,10
+117,16
@@
extern int errno;
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)