From 60be6acf46ab7851a01396f8cd2439a9f61118ae Mon Sep 17 00:00:00 2001 From: David Dykstra Date: Thu, 6 Jan 2000 16:15:36 +0000 Subject: [PATCH] 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. --- generator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generator.c b/generator.c index 9bf0e959..3f6322f8 100644 --- a/generator.c +++ b/generator.c @@ -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; } -- 2.34.1