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
4a86fbcd
Commit
4a86fbcd
authored
Mar 22, 2008
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change ex_len to pre_len in add_rule().
parent
bc267e0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
exclude.c
exclude.c
+9
-9
No files found.
exclude.c
View file @
4a86fbcd
...
...
@@ -119,7 +119,7 @@ static void add_rule(struct filter_list_struct *listp, const char *pat,
{
struct
filter_struct
*
ret
;
const
char
*
cp
;
unsigned
int
ex
_len
;
unsigned
int
pre
_len
;
if
(
verbose
>
2
)
{
rprintf
(
FINFO
,
"[%s] add_rule(%s%.*s%s)%s
\n
"
,
...
...
@@ -150,17 +150,17 @@ static void add_rule(struct filter_list_struct *listp, const char *pat,
||
(
xflags
&
XFLG_ABS_IF_SLASH
&&
strchr
(
pat
,
'/'
)
!=
NULL
)))
{
mflags
|=
MATCHFLG_ABS_PATH
;
if
(
*
pat
==
'/'
)
ex
_len
=
dirbuf_len
-
module_dirlen
-
1
;
pre
_len
=
dirbuf_len
-
module_dirlen
-
1
;
else
ex
_len
=
0
;
pre
_len
=
0
;
}
else
ex
_len
=
0
;
if
(
!
(
ret
->
pattern
=
new_array
(
char
,
ex
_len
+
pat_len
+
1
)))
pre
_len
=
0
;
if
(
!
(
ret
->
pattern
=
new_array
(
char
,
pre
_len
+
pat_len
+
1
)))
out_of_memory
(
"add_rule"
);
if
(
ex
_len
)
memcpy
(
ret
->
pattern
,
dirbuf
+
module_dirlen
,
ex
_len
);
strlcpy
(
ret
->
pattern
+
ex
_len
,
pat
,
pat_len
+
1
);
pat_len
+=
ex
_len
;
if
(
pre
_len
)
memcpy
(
ret
->
pattern
,
dirbuf
+
module_dirlen
,
pre
_len
);
strlcpy
(
ret
->
pattern
+
pre
_len
,
pat
,
pat_len
+
1
);
pat_len
+=
pre
_len
;
if
(
strpbrk
(
ret
->
pattern
,
"*[?"
))
{
mflags
|=
MATCHFLG_WILD
;
...
...
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