Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated exit codes as Jon Jensen and J.W. suggested.
[rsync/rsync.git]
/
flist.c
diff --git
a/flist.c
b/flist.c
index
b5ccbf5
..
8bc3ab3
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-877,14
+877,19
@@
static void send_directory(int f, struct file_list *flist, char *dir)
}
}
}
}
- for (
di = readdir(d); di;
di = readdir(d)) {
+ for (
errno = 0, di = readdir(d); di; errno = 0,
di = readdir(d)) {
char *dname = d_name(di);
char *dname = d_name(di);
- if (dname[0] == '.' && (dname[1] == '\0'
||
- (dname[1] == '.' && dname[2] == '\0')))
+ if (dname[0] == '.' && (dname[1] == '\0'
+
||
(dname[1] == '.' && dname[2] == '\0')))
continue;
strlcpy(p, dname, MAXPATHLEN - l);
send_file_name(f, flist, fname, recurse, 0);
}
continue;
strlcpy(p, dname, MAXPATHLEN - l);
send_file_name(f, flist, fname, recurse, 0);
}
+ if (errno) {
+ io_error = 1;
+ rprintf(FERROR, "readdir(%s): (%d) %s\n",
+ dir, errno, strerror(errno));
+ }
if (local_exclude_list)
free_exclude_list(&local_exclude_list); /* Zeros pointer too */
if (local_exclude_list)
free_exclude_list(&local_exclude_list); /* Zeros pointer too */