File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ def __init__(self, ftc: FileTransmissionCommand):
7272 def __repr__ (self ) -> str :
7373 return f'File(rpath={ self .remote_path !r} , lpath={ self .expanded_local_path !r} )'
7474
75+ def close (self ) -> None :
76+ if self .actual_file is not None :
77+ self .actual_file .close ()
78+ self .actual_file = None
79+
7580 def write_data (self , data : bytes , is_last : bool ) -> int :
7681 self .received_bytes += len (data )
7782 data = self .decompressor (data , is_last )
@@ -639,6 +644,8 @@ def receive_main(cli_opts: TransferCLIOptions, args: List[str]) -> None:
639644 loop = Loop ()
640645 handler = Receive (cli_opts , spec , dest )
641646 loop .loop (handler )
647+ for f in handler .manager .files :
648+ f .close ()
642649 tsf = dsz = ssz = 0
643650 for f in handler .manager .files :
644651 if f .expect_diff :
You can’t perform that action at this time.
0 commit comments