If a destination file cannot be opened, pretend it doesn't exist rather
authorDavid Dykstra <dwd@samba.org>
Thu, 6 Jan 2000 16:15:36 +0000 (16:15 +0000)
committerDavid Dykstra <dwd@samba.org>
Thu, 6 Jan 2000 16:15:36 +0000 (16:15 +0000)
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.

generator.c

index 9bf0e95..3f6322f 100644 (file)
@@ -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;
        }