extern int copy_links;
extern int copy_unsafe_links;
extern int protocol_version;
-extern int io_error;
extern int sanitize_paths;
extern int read_batch;
extern struct exclude_struct **server_exclude_list;
extern struct exclude_struct **local_exclude_list;
+int io_error;
+
static struct file_struct null_file;
static void clean_flist(struct file_list *flist, int strip_root, int no_dups);
return NULL;
}
}
- io_error = 1;
+ io_error |= IOERR_GENERAL;
rprintf(FERROR, "readlink %s failed: %s\n",
full_fname(fname), strerror(save_errno));
return NULL;
d = opendir(dir);
if (!d) {
- io_error = 1;
+ io_error |= IOERR_GENERAL;
rprintf(FERROR, "opendir %s failed: %s\n",
full_fname(dir), strerror(errno));
return;
l = strlen(fname);
if (fname[l - 1] != '/') {
if (l == MAXPATHLEN - 1) {
- io_error = 1;
+ io_error |= IOERR_GENERAL;
rprintf(FERROR, "skipping long-named directory: %s\n",
full_fname(fname));
closedir(d);
strcpy(p, ".cvsignore");
add_exclude_file(&exclude_list,fname,MISSING_OK,ADD_EXCLUDE);
} else {
- io_error = 1;
+ io_error |= IOERR_GENERAL;
rprintf(FINFO,
"cannot cvs-exclude in long-named directory %s\n",
full_fname(fname));
send_file_name(f, flist, fname, recurse, 0);
}
if (errno) {
- io_error = 1;
+ io_error |= IOERR_GENERAL;
rprintf(FERROR, "readdir(%s): (%d) %s\n",
dir, errno, strerror(errno));
}
if (link_stat(fname, &st) != 0) {
if (f != -1) {
- io_error = 1;
+ io_error |= IOERR_GENERAL;
rprintf(FERROR, "link_stat %s failed: %s\n",
full_fname(fname), strerror(errno));
}
olddir = push_dir(dir, 1);
if (!olddir) {
- io_error = 1;
+ io_error |= IOERR_GENERAL;
rprintf(FERROR, "push_dir %s failed: %s\n",
full_fname(dir), strerror(errno));
continue;