From 7fe06c247babfdd7514dce8e4c34282d1abf4fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 3 Jul 2018 12:56:08 +0200 Subject: [PATCH] Also report transfer progress on MOVE Previously transfers were only reported when copying files. --- blender_asset_tracer/pack/filesystem.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blender_asset_tracer/pack/filesystem.py b/blender_asset_tracer/pack/filesystem.py index c27528e..51c3eef 100644 --- a/blender_asset_tracer/pack/filesystem.py +++ b/blender_asset_tracer/pack/filesystem.py @@ -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."""