File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ def __init__(
7979 self ._notify = notify
8080 self ._finalised = False
8181 self ._end_time = end_time
82+ self ._finalising = False
8283
8384 self ._skipped_files : List [Path ] = []
8485
@@ -199,7 +200,8 @@ def finalise(
199200 self .stop ()
200201 self ._remove_files = True
201202 self ._notify = False
202- self ._end_time = datetime .now ()
203+ self ._end_time = None
204+ self ._finalising = True
203205 if thread :
204206 self .thread = threading .Thread (
205207 name = f"RSync finalisation { self ._basepath } :{ self ._remote } " ,
@@ -330,6 +332,9 @@ def _transfer(self, infiles: list[Path]) -> bool:
330332 ]
331333 self ._skipped_files .extend (set (infiles ).difference (set (files )))
332334 num_skipped_files = len (set (infiles ).difference (set (files )))
335+ elif self ._finalising :
336+ files = [f for f in infiles if f .is_file () and f not in self ._skipped_files ]
337+ num_skipped_files = 0
333338 else :
334339 files = [f for f in infiles if f .is_file ()]
335340 num_skipped_files = 0
You can’t perform that action at this time.
0 commit comments