If the generator sends us the index of a directory, generate an

error and die.
This commit is contained in:
Wayne Davison
2005-02-02 17:15:22 +00:00
parent 6bf822649b
commit afd72c78bd

View File

@@ -145,6 +145,11 @@ void send_files(struct file_list *flist, int f_out, int f_in)
updating_basis_file = inplace && !make_backups;
file = flist->files[i];
if (S_ISDIR(file->mode)) {
rprintf(FERROR, "[%s] got index of directory: %d\n",
who_am_i(), i);
exit_cleanup(RERR_PROTOCOL);
}
stats.current_file_index = i;
stats.num_transferred_files++;