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
9510fa9a
Commit
9510fa9a
authored
Dec 24, 2011
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow --max-size=0 and --min-size=0.
Fixes bug 7965.
parent
d74512eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
12 deletions
+18
-12
generator.c
generator.c
+8
-6
options.c
options.c
+6
-6
rsync.yo
rsync.yo
+4
-0
No files found.
generator.c
View file @
9510fa9a
...
...
@@ -1602,7 +1602,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto
cleanup
;
}
if
(
max_size
>
0
&&
F_LENGTH
(
file
)
>
max_size
)
{
if
(
max_size
>
=
0
&&
F_LENGTH
(
file
)
>
max_size
)
{
if
(
INFO_GTE
(
SKIP
,
1
))
{
if
(
solo_file
)
fname
=
f_name
(
file
,
NULL
);
...
...
@@ -1610,7 +1610,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
goto
cleanup
;
}
if
(
min_size
>
0
&&
F_LENGTH
(
file
)
<
min_size
)
{
if
(
min_size
>
=
0
&&
F_LENGTH
(
file
)
<
min_size
)
{
if
(
INFO_GTE
(
SKIP
,
1
))
{
if
(
solo_file
)
fname
=
f_name
(
file
,
NULL
);
...
...
@@ -2062,9 +2062,11 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
#endif
if
(
check_redo
&&
(
ndx
=
get_redo_num
())
!=
-
1
)
{
OFF_T
save_max_size
=
max_size
;
OFF_T
save_min_size
=
min_size
;
csum_length
=
SUM_LENGTH
;
max_size
=
-
max_size
;
min_size
=
-
min_size
;
max_size
=
-
1
;
min_size
=
-
1
;
ignore_existing
=
-
ignore_existing
;
ignore_non_existing
=
-
ignore_non_existing
;
update_only
=
-
update_only
;
...
...
@@ -2088,8 +2090,8 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
cur_flist
=
flist
;
csum_length
=
SHORT_SUM_LENGTH
;
max_size
=
-
max_size
;
min_size
=
-
min_size
;
max_size
=
save_
max_size
;
min_size
=
save_
min_size
;
ignore_existing
=
-
ignore_existing
;
ignore_non_existing
=
-
ignore_non_existing
;
update_only
=
-
update_only
;
...
...
options.c
View file @
9510fa9a
...
...
@@ -114,8 +114,8 @@ int ignore_existing = 0;
int
ignore_non_existing
=
0
;
int
need_messages_from_generator
=
0
;
int
max_delete
=
INT_MIN
;
OFF_T
max_size
=
0
;
OFF_T
min_size
=
0
;
OFF_T
max_size
=
-
1
;
OFF_T
min_size
=
-
1
;
int
ignore_errors
=
0
;
int
modify_window
=
0
;
int
blocking_io
=
-
1
;
...
...
@@ -1590,7 +1590,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
break
;
case
OPT_MAX_SIZE
:
if
((
max_size
=
parse_size_arg
(
&
max_size_arg
,
'b'
))
<
=
0
)
{
if
((
max_size
=
parse_size_arg
(
&
max_size_arg
,
'b'
))
<
0
)
{
snprintf
(
err_buf
,
sizeof
err_buf
,
"--max-size value is invalid: %s
\n
"
,
max_size_arg
);
...
...
@@ -1599,7 +1599,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
break
;
case
OPT_MIN_SIZE
:
if
((
min_size
=
parse_size_arg
(
&
min_size_arg
,
'b'
))
<
=
0
)
{
if
((
min_size
=
parse_size_arg
(
&
min_size_arg
,
'b'
))
<
0
)
{
snprintf
(
err_buf
,
sizeof
err_buf
,
"--min-size value is invalid: %s
\n
"
,
min_size_arg
);
...
...
@@ -2545,11 +2545,11 @@ void server_options(char **args, int *argc_p)
args
[
ac
++
]
=
arg
;
}
else
if
(
max_delete
==
0
)
args
[
ac
++
]
=
"--max-delete=-1"
;
if
(
min_size
)
{
if
(
min_size
>=
0
)
{
args
[
ac
++
]
=
"--min-size"
;
args
[
ac
++
]
=
min_size_arg
;
}
if
(
max_size
)
{
if
(
max_size
>=
0
)
{
args
[
ac
++
]
=
"--max-size"
;
args
[
ac
++
]
=
max_size_arg
;
}
...
...
rsync.yo
View file @
9510fa9a
...
...
@@ -1448,11 +1448,15 @@ be offset by one byte in the indicated direction.
Examples: --max-size=1.5mb-1 is 1499999 bytes, and --max-size=2g+1 is
2147483649 bytes.
Note that rsync versions prior to 3.1.0 did not allow bf(--max-size=0).
dit(bf(--min-size=SIZE)) This tells rsync to avoid transferring any
file that is smaller than the specified SIZE, which can help in not
transferring small, junk files.
See the bf(--max-size) option for a description of SIZE and other information.
Note that rsync versions prior to 3.1.0 did not allow bf(--min-size=0).
dit(bf(-B, --block-size=BLOCKSIZE)) This forces the block size used in
rsync's delta-transfer algorithm to a fixed value. It is normally selected based on
the size of each file being updated. See the technical report for details.
...
...
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