Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
64f21c3
)
Back out bad refactor (thanks Wayne)
author
J.W. Schultz
<jw@samba.org>
Mon, 26 Jan 2004 20:54:02 +0000
(20:54 +0000)
committer
J.W. Schultz
<jw@samba.org>
Mon, 26 Jan 2004 20:54:02 +0000
(20:54 +0000)
flist.c
patch
|
blob
|
blame
|
history
diff --git
a/flist.c
b/flist.c
index
7ea494f
..
6de758c
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-293,7
+293,6
@@
static void set_filesystem(char *fname)
STRUCT_STAT st;
if (link_stat(fname, &st) != 0)
return;
STRUCT_STAT st;
if (link_stat(fname, &st) != 0)
return;
-
filesystem_dev = st.st_dev;
}
filesystem_dev = st.st_dev;
}
@@
-702,18
+701,22
@@
void receive_file_entry(struct file_struct **fptr, unsigned short flags, int f)
static int skip_filesystem(char *fname, STRUCT_STAT * st)
{
STRUCT_STAT st2;
static int skip_filesystem(char *fname, STRUCT_STAT * st)
{
STRUCT_STAT st2;
+ char *p = strrchr(fname, '/');
/* skip all but directories */
if (!S_ISDIR(st->st_mode))
return 1;
/* if its not a subdirectory then allow */
/* skip all but directories */
if (!S_ISDIR(st->st_mode))
return 1;
/* if its not a subdirectory then allow */
- if (!
strrchr(fname, '/')
)
+ if (!
p
)
return 0;
return 0;
- if (link_stat(fname, &st2) != 0) {
+ *p = 0;
+ if (link_stat(fname, &st2)) {
+ *p = '/';
return 0;
}
return 0;
}
+ *p = '/';
return (st2.st_dev != filesystem_dev);
}
return (st2.st_dev != filesystem_dev);
}