fix case where file was deleted and directory created in it's stead. Notes: Fri Apr 6 10:20:53 EDT 2007 rsc I am worried by the change from if to else if in the patch. It looks like before, if the file changed you'd get a c line and if the metadata changed you'd get an m line, and if both changed you'd get both, but now you just get a c line. Reference: /n/sources/patch/saved/updatedb-ftod Date: Wed Mar 7 22:36:24 CET 2007 Signed-off-by: quanstro@quanstro.net Reviewed-by: geoff --- /sys/src/cmd/replica/updatedb.c Wed Mar 7 22:35:42 2007 +++ /sys/src/cmd/replica/updatedb.c Wed Mar 7 22:35:39 2007 @@ -77,11 +77,15 @@ change = 1; } }else{ - if((d.mode&DMDIR)==0 && (od.mtime!=d.mtime || od.length!=d.length)){ + if((od.mode&DMDIR) != (d.mode&DMDIR)){ + xlog('d', new, &d); + xlog('a', new, &d); + change = 1; + }else if((d.mode&DMDIR)==0 && (od.mtime!=d.mtime || od.length!=d.length)){ xlog('c', new, &d); change = 1; } - if((!uid&&strcmp(od.uid,d.uid)!=0) + else if((!uid&&strcmp(od.uid,d.uid)!=0) || strcmp(od.gid,d.gid)!=0 || od.mode!=d.mode){ xlog('m', new, &d);