Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
c291d057
Commit
c291d057
authored
Oct 26, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed problem with anchored filter and an absolute
source path with --relative.
parent
9520ce4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
exclude.c
exclude.c
+4
-5
No files found.
exclude.c
View file @
c291d057
...
...
@@ -518,15 +518,14 @@ void change_local_filter_dir(const char *dname, int dlen, int dir_depth)
filt_array
[
cur_depth
]
=
push_local_filters
(
dname
,
dlen
);
}
static
int
rule_matches
(
char
*
name
,
struct
filter_struct
*
ex
,
int
name_is_dir
)
static
int
rule_matches
(
char
*
f
name
,
struct
filter_struct
*
ex
,
int
name_is_dir
)
{
int
slash_handling
,
str_cnt
=
0
,
anchored_match
=
0
;
int
ret_match
=
ex
->
match_flags
&
MATCHFLG_NEGATE
?
0
:
1
;
char
*
p
,
*
pattern
=
ex
->
pattern
;
const
char
*
strings
[
16
];
/* more than enough */
char
*
name
=
fname
+
(
*
fname
==
'/'
);
if
(
*
name
==
'/'
)
name
++
;
if
(
!*
name
)
return
0
;
...
...
@@ -536,13 +535,13 @@ static int rule_matches(char *name, struct filter_struct *ex, int name_is_dir)
* just match the name portion of the path. */
if
((
p
=
strrchr
(
name
,
'/'
))
!=
NULL
)
name
=
p
+
1
;
}
else
if
(
ex
->
match_flags
&
MATCHFLG_ABS_PATH
&&
*
name
!=
'/'
}
else
if
(
ex
->
match_flags
&
MATCHFLG_ABS_PATH
&&
*
f
name
!=
'/'
&&
curr_dir_len
>
module_dirlen
+
1
)
{
/* If we're matching against an absolute-path pattern,
* we need to prepend our full path info. */
strings
[
str_cnt
++
]
=
curr_dir
+
module_dirlen
+
1
;
strings
[
str_cnt
++
]
=
"/"
;
}
else
if
(
ex
->
match_flags
&
MATCHFLG_WILD2_PREFIX
&&
*
name
!=
'/'
)
{
}
else
if
(
ex
->
match_flags
&
MATCHFLG_WILD2_PREFIX
&&
*
f
name
!=
'/'
)
{
/* Allow "**"+"/" to match at the start of the string. */
strings
[
str_cnt
++
]
=
"/"
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment