mirror of
https://github.com/FAUSheppy/homelab_gamevault
synced 2025-12-06 15:01:36 +01:00
fix: prevent abs cache paths
This commit is contained in:
@@ -173,6 +173,8 @@ class FTP(DataBackend):
|
|||||||
fullpath = fullpath.replace("\\", "/")
|
fullpath = fullpath.replace("\\", "/")
|
||||||
local_file = os.path.join(cache_dir, os.path.basename(path))
|
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):
|
if not os.path.isfile(local_file):
|
||||||
ftp = self._connect()
|
ftp = self._connect()
|
||||||
ftp.sendcmd('TYPE I')
|
ftp.sendcmd('TYPE I')
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class Software:
|
|||||||
self.backend = backend
|
self.backend = backend
|
||||||
print("Software Directory:", self.directory)
|
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 #
|
# return None instead of the object if yaml failed #
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user