Commit 60be6acf authored by David Dykstra's avatar David Dykstra

If a destination file cannot be opened, pretend it doesn't exist rather

than skipping it and thus not updating it.  For example, the ownership or
mode on a file may prevent opening it, but the directory may still be
writable so the file could be completely replaced.
parent a5827a28
......@@ -353,8 +353,10 @@ void recv_generator(char *fname,struct file_list *flist,int i,int f_out)
fd = do_open(fnamecmp, O_RDONLY, 0);
if (fd == -1) {
rprintf(FERROR,"failed to open %s : %s\n",fnamecmp,strerror(errno));
rprintf(FERROR,"skipping %s\n",fname);
rprintf(FERROR,"failed to open %s, continuing : %s\n",fnamecmp,strerror(errno));
/* pretend the file didn't exist */
write_int(f_out,i);
send_sums(NULL,f_out);
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment