On Fri, Jan 31, 2003 at 12:09:14PM +0100, Lapo Luchini wrote:
> Max Bowsher wrote:
> 
> >Unless someone feels like making a FAT-detection patch, the previous status
> >quo looks to me like the best option.
> >
> Would "creating a file in the same dir" be "too invasive"?
> Of course this would only solve the problem if one file is 
> created/tested "per directory"...
> I guess cygwin HAS a call to examine the mount table and to try directly 
> "one file per mount", but the root of the mount could be non writeable.
> Mhh. Not so easy as a patch as I first thought.
> 
> Will check ASAP.

I don't think creating a file on the receiver would be too
invasive.  Just clunky.  I assume you are thinking of
setting mtime to an odd value and see if it remains the same
or is rounded.  Doing this once per directory would be
insane.  I don't much like the idea but maybe do it for each
file...

        static dev_t prev_dev = 0;
        static int fs_1second = 1;

                if (cmp_modtime(st->st_mtime,file->modtime) == 0) {
                        return 0;
                }

                if (!(file->modtime - st->st_mtime == 1 || file->modtime & 1)) {
                        return 1;
                }

# does st_dev represent anything meaningful on cygwin?
# if not use dirname(fname) and strcmp(ewww!)
                if (prev_dev != st->st_dev) {
                        prev_dev = st->st_dev;
                        fs_1second = test_fs_1second(fname);
                }
                return fs_1second;
                
                
yuck!  I feel icky typing it, but it would work.  So you
know, this would replace the current cmp_modtime line in
skip_file().  The only thing it favor of this is that it
would exactly cover the FAT or FAT over samba receiver case
with no detectable false negatives.

-- 
________________________________________________________________
        J.W. Schultz            Pegasystems Technologies
        email address:          [EMAIL PROTECTED]

                Remember Cernan and Schmitt
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Reply via email to