WIP: change default data directories, subdirectories and config file

This commit is contained in:
caryoscelus 2024-05-07 14:03:44 +00:00
parent e8da744744
commit bdddf58712
No known key found for this signature in database
GPG key ID: 254EDDB85B66CB1F
27 changed files with 263 additions and 121 deletions

View file

@ -44,7 +44,7 @@ class UiRequestPlugin(object):
if ".zip/" in path or ".tar.gz/" in path:
file_obj = None
path_parts = self.parsePath(path)
file_path = "%s/%s/%s" % (config.data_dir, path_parts["address"], path_parts["inner_path"])
file_path = config.data_dir / path_parts["address"] / path_parts["inner_path"]
match = re.match(r"^(.*\.(?:tar.gz|zip))/(.*)", file_path)
archive_path, path_within = match.groups()
if archive_path not in archive_cache: