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:
d4bac80
)
(is_empty_dir): Don't let a failing closedir
author
Jim Meyering
<jim@meyering.net>
Sun, 30 Mar 2003 15:02:55 +0000
(15:02 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sun, 30 Mar 2003 15:02:55 +0000
(15:02 +0000)
clobber errno. Spotted by Arnold Robbins.
src/remove.c
patch
|
blob
|
history
diff --git
a/src/remove.c
b/src/remove.c
index a0ad0a124b33d9f9d05998b056affd09f4ac5ec3..21c5ac0ac3cef085518d77f7863538bfa3db3d09 100644
(file)
--- a/
src/remove.c
+++ b/
src/remove.c
@@
-527,8
+527,9
@@
is_empty_dir (char const *dir)
dp = readdir (dirp);
if (dp == NULL)
{
+ int saved_errno = errno;
closedir (dirp);
- return errno == 0 ? true : false;
+ return
saved_
errno == 0 ? true : false;
}
f = dp->d_name;