Also report transfer progress on MOVE

Previously transfers were only reported when copying files.
This commit is contained in:
Sybren A. Stüvel 2018-07-03 12:56:08 +02:00
parent 6edc15594d
commit 7fe06c247b

View File

@ -82,8 +82,12 @@ class FileCopier(transfer.FileTransferer):
log.info('Skipped %d files', self.files_skipped)
def move(self, srcpath: pathlib.Path, dstpath: pathlib.Path):
s_stat = srcpath.stat()
shutil.move(str(srcpath), str(dstpath))
self.files_transferred += 1
self.report_transferred(s_stat.st_size)
def copyfile(self, srcpath: pathlib.Path, dstpath: pathlib.Path):
"""Copy a file, skipping when it already exists."""