mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-10-26 02:48:57 -04:00
Fixed rngit file resource operations failing on Windows
This commit is contained in:
parent
9ae3db169e
commit
05e6717d21
1 changed files with 2 additions and 0 deletions
|
|
@ -291,6 +291,8 @@ class ReticulumGitClient():
|
|||
|
||||
if hasattr(self.request_response, "read") and callable(self.request_response.read):
|
||||
response_path = self.request_response.name
|
||||
try: self.request_response.close()
|
||||
except Exception as e: RNS.log(f"Could not close resource file descriptor before retain: {e}", RNS.LOG_ERROR)
|
||||
base_name = os.path.basename(response_path)
|
||||
retained_path = os.path.join(self.tmp_dir.name, base_name)
|
||||
shutil.move(response_path, retained_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue