[unpackfs] Make comment match code
- The mismatch between "ir-chk" and the comment "to-check" led me to check (ha!) the output of rsync, and it outputs "to-chk" during small transfers; make sure the comment reflects what is actually being used to track progress (which is "ir-chk").
This commit is contained in:
parent
a57f2fec74
commit
38821f47ba
@ -110,17 +110,17 @@ def file_copy(source, dest, progress_cb):
|
||||
|
||||
for line in iter(process.stdout.readline, b''):
|
||||
# small comment on this regexp.
|
||||
# rsync outputs three parameters in the progress.
|
||||
# xfer#x => i try to interpret it as 'file copy try no. x'
|
||||
# to-check=x/y, where:
|
||||
# rsync outputs three items in the progress (in parentheses)
|
||||
# - xfer#x => Interpret it as 'file copy try no. x'
|
||||
# - ir-chk=x/y, where:
|
||||
# - x = number of files yet to be checked
|
||||
# - y = currently calculated total number of files.
|
||||
# but if you're copying directory with some links in it, the xfer#
|
||||
# - to-chk=x/y, which is similar but seems to only be emitted when
|
||||
# progress is short; these are ignored.
|
||||
#
|
||||
# If you're copying directory with some links in it, the xfer#
|
||||
# might not be a reliable counter (for one increase of xfer, many
|
||||
# files may be created).
|
||||
# In case of manjaro, we pre-compute the total number of files.
|
||||
# therefore we can easily subtract x from y in order to get real files
|
||||
# copied / processed count.
|
||||
m = re.findall(r'xfr#(\d+), ir-chk=(\d+)/(\d+)', line.decode())
|
||||
|
||||
if m:
|
||||
|
Loading…
Reference in New Issue
Block a user