diff --git a/data_backend.py b/data_backend.py index 2f1d3b7..739aeca 100644 --- a/data_backend.py +++ b/data_backend.py @@ -173,6 +173,8 @@ class FTP(DataBackend): fullpath = fullpath.replace("\\", "/") local_file = os.path.join(cache_dir, os.path.basename(path)) + # print("Cachedir:", cache_dir, os.path.basename(path), local_file) + if not os.path.isfile(local_file): ftp = self._connect() ftp.sendcmd('TYPE I') diff --git a/software.py b/software.py index af75d8f..0879340 100644 --- a/software.py +++ b/software.py @@ -17,7 +17,7 @@ class Software: self.backend = backend print("Software Directory:", self.directory) - self.cache_dir = backend.cache_dir or os.path.join("cache", self.directory) + self.cache_dir = backend.cache_dir or os.path.join("cache", self.directory.lstrip("/").lstrip("\\")) # return None instead of the object if yaml failed # try: