From 6d30df7ed6744b6f29193c152e7e2259b715c690 Mon Sep 17 00:00:00 2001 From: awsr <43862868+awsr@users.noreply.github.com> Date: Thu, 5 Feb 2026 15:55:18 -0800 Subject: [PATCH] Adjust input normalization --- javascript/gallery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/gallery.js b/javascript/gallery.js index 0d7498bef..ecb3750c0 100644 --- a/javascript/gallery.js +++ b/javascript/gallery.js @@ -391,8 +391,8 @@ class GalleryFile extends HTMLElement { this.folder = folder; this.name = file; this.#signal = signal; - this.src = `${this.folder}/${this.name}`; - this.fullFolder = this.src.replace(/\/+/g, '/').replace(/\/[^/]+$/, ''); + this.src = `${this.folder}/${this.name}`.replace(/\/+/g, '/'); // Ensure no //, ///, etc... + this.fullFolder = this.src.replace(/\/[^/]+$/, ''); this.size = 0; this.mtime = 0; this.hash = undefined;