mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-21 05:14:15 -04:00
Changed the parsing of suffixes for --min-size and --max-size a little.
This commit is contained in:
1 parent
60613dc896
commit
bee9df73c1
2 files changed
+8
-7
No files matched your search
@@ -677,7 +677,7 @@ static OFF_T parse_size_arg(char **size_arg, char def_suf)
|
||||
for (arg = *size_arg; isdigit(*(uchar*)arg); arg++) {}
|
||||
if (*arg == '.')
|
||||
for (arg++; isdigit(*(uchar*)arg); arg++) {}
|
||||
if (*arg && (arg[1] == 't' || arg[1] == 'T'))
|
||||
if (*arg && (arg[1] == 'b' || arg[1] == 'B'))
|
||||
mult = 1000, make_compatible = 1;
|
||||
else
|
||||
mult = 1024;
|
||||
|
||||
@@ -818,14 +818,15 @@ file that is larger than the specified SIZE. The SIZE value can be
|
||||
suffixed with a string to indicate a size multiplier, and
|
||||
may be a fractional value (e.g. "bf(--max-size=1.5m)").
|
||||
|
||||
The suffixes are as follows: "K" (or "k") is a kilobyte (1024),
|
||||
"M" (or "m") is a megabyte (1024*1024), and "G" (or "g") is a
|
||||
gigabyte (1024*1024*1024).
|
||||
If you want the multiplier to be 1000 instead of 1024, suffix the K, G, or
|
||||
M with a "T" (or "t") to indicate that a power of 10 is desired.
|
||||
The suffixes are as follows: "K" (or "KiB") is a kibibyte (1024),
|
||||
"M" (or "MiB") is a mebibyte (1024*1024), and "G" (or "GiB") is a
|
||||
gibibyte (1024*1024*1024).
|
||||
If you want the multiplier to be 1000 instead of 1024, use "KB",
|
||||
"MB", or "GB". (Note: lower-case is also accepted for all values.)
|
||||
Finally, if the suffix ends in either "+1" or "-1", the value will
|
||||
be offset by one byte in the indicated direction.
|
||||
Examples: --max-size=1.5mt-1 is 1499999 bytes, and --max-size=2g+1 is
|
||||
|
||||
Examples: --max-size=1.5mb-1 is 1499999 bytes, and --max-size=2g+1 is
|
||||
2147483649 bytes.
|
||||
|
||||
dit(bf(--min-size=SIZE)) This tells rsync to avoid transferring any
|
||||
|
||||
Reference in new issue
Block a user