double slash fix

This commit is contained in:
2024-06-28 20:20:24 +02:00
parent af4109bcfa
commit 94b6e7472c

View File

@@ -24,7 +24,7 @@ _THEME = os.path.join(os.path.abspath(os.path.dirname(__file__)), "themes", "def
_AUTHOR = "Author" _AUTHOR = "Author"
# fmt: off # fmt: off
rawext = [".3fr", ".ari", ".arw", ".bay", ".braw", ".crw", ".cr2", ".cr3", ".cap", ".data", ".dcs", ".dcr", ".dng", ".drf", ".eip", ".erf", ".fff", ".gpr", ".iiq", ".k25", ".kdc", ".mdc", ".mef", ".mos", ".mrw", ".nef", ".nrw", ".obm", ".orf", ".pef", ".ptx", ".pxn", ".r3d", ".raf", ".raw", ".rwl", ".rw2", ".rwz", ".sr2", ".srf", ".srw", ".tif", ".tiff", ".x3f"] rawext = [".3fr", ".ari", ".arw", ".bay", ".braw", ".crw", ".cr2", ".cr3", ".cap", ".data", ".dcs", ".dcr", ".dng", ".drf", ".eip", ".erf", ".fff", ".gpr", ".iiq", ".k25", ".kdc", ".mdc", ".mef", ".mos", ".mrw", ".nef", ".nrw", ".obm", ".orf", ".pef", ".ptx", ".pxn", ".r3d", ".raf", ".raw", ".rwl", ".rw2", ".rwz", ".sr2", ".srf", ".srw", ".tif", ".tiff", ".x3f"]
imgext = [".jpg", ".jpeg"] imgext = [".jpg", ".jpeg", ".png"]
excludes = [".lock", "index.html", ".thumbnails", ".static"] excludes = [".lock", "index.html", ".thumbnails", ".static"]
notlist = ["Galleries", "Archives"] notlist = ["Galleries", "Archives"]
# fmt: on # fmt: on
@@ -71,9 +71,7 @@ def listfolder(folder: str, title: str):
if item not in notlist: if item not in notlist:
listfolder(os.path.join(folder, item), os.path.join(folder, item).removeprefix(args.root)) listfolder(os.path.join(folder, item), os.path.join(folder, item).removeprefix(args.root))
else: else:
baseurl = urllib.parse.quote(foldername) + "/" baseurl = urllib.parse.quote(foldername) + urllib.parse.quote(item)
if baseurl == "/":
baseurl = ""
extsplit = os.path.splitext(item) extsplit = os.path.splitext(item)
if not args.non_interactive: if not args.non_interactive:
pbar.desc = f"Generating html files - {folder}" pbar.desc = f"Generating html files - {folder}"