This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

'diff -ruw' messes up on shadow mounts for directories but works for files


I use vshadow under WinXP to create shadow copies of my Windows
partitions and then I use dosdev to associate the shadow copies with
drive letters (since at least in the past it was not possible to
access WinXP shadow copies directly from cygwin). I then mount the
drive using the standard cygwin mount command.

Now commands like 'ls' and 'find' all show that the shadow copy is
properly mounted.

When I run 'diff' on an *individual* file to check for differences
between the shadow copy and the original it works perfectly.

HOWEVER, when I run 'diff -ruw', on a directory to check recursively
for differences between the original and the shadow copy, it just
returns immediately (no matter how big the directory tree) with no
output and a successful exit code (0). This happens even though many
files have changed in the tree both in the top level directory and
below.

HOWEVER if I add a *new* file to the *top* level directory being
compared, then 'diff -ruw' works fine. It continues to work fine even
if I remove the new file. It also then works fine on any other
directory tree containing that tree. But not on other directory trees
that don't intersect with the one just touched. Also, adding a new
file below the top level directory doesn't help. Nor does modifying an
*existing* file in the top level directory.

ALSO, if I make a copy first of the original directory and compare it
the shadow copy version then it always works.

SO, it seems like diff is not properly getting the directory of the
shadow mount and perhaps thinks it is the original non-shadow version
and therefore if the inode of the top level directory hasn't changed
(say by adding a new a file), it takes a shortcut and doesn't actually
try to recurse down the directory listing to see if indeed the files
have changed but rather just comes back immediately and says hey since
the top level directory is the 'same' the whole tree must be the same,
so no diffs.

Note that 'rsync -a' does not experience this problem.

Any thoughts on what might be going on here?




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]