From e6c7b76ccd6949eda1b494113e8a7e4160ef7067 Mon Sep 17 00:00:00 2001 From: edo-neo Date: Wed, 23 Oct 2024 11:46:57 +0200 Subject: [PATCH] dev.r5portal remote_fetch fix --- src/components/archive_synchronizer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/archive_synchronizer.py b/src/components/archive_synchronizer.py index 0ab74c6..cc404d0 100644 --- a/src/components/archive_synchronizer.py +++ b/src/components/archive_synchronizer.py @@ -4,6 +4,8 @@ import re import sys import threading import time +from pathlib import Path + import requests import traceback from bs4 import BeautifulSoup @@ -230,8 +232,8 @@ class ArchiveSynchronizer(Component): continue # Save the file to /tmp/ - project_tmp_path = "/home/edo-neo/PycharmProjects/st-ten-1/tmp" - local_file_path = os.path.join(project_tmp_path, os.path.basename(specific_file_url)) + self.download_path = os.path.join(Path.home(), "PycharmProjects", "st-ten-1", "tmp") + local_file_path = os.path.join(self.download_path, os.path.basename(specific_file_url)) os.makedirs(os.path.dirname(local_file_path), exist_ok=True) with open(local_file_path, "wb") as f: