From e7d382dc29b24d7f3ae3ada2e7658d40921e177a Mon Sep 17 00:00:00 2001 From: awsr <43862868+awsr@users.noreply.github.com> Date: Thu, 5 Feb 2026 15:15:33 -0800 Subject: [PATCH] Restore saving full folder path to database --- javascript/gallery.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/javascript/gallery.js b/javascript/gallery.js index 5b18205be..0d7498bef 100644 --- a/javascript/gallery.js +++ b/javascript/gallery.js @@ -391,13 +391,14 @@ 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.size = 0; this.mtime = 0; this.hash = undefined; this.exif = ''; this.width = 0; this.height = 0; - this.src = `${this.folder}/${this.name}`; this.shadow = this.attachShadow({ mode: 'open' }); this.shadow.adoptedStyleSheets = [fileStylesheet]; @@ -458,7 +459,7 @@ class GalleryFile extends HTMLElement { if (opts.browser_cache) { await idbAdd({ hash: this.hash, - folder: this.folder, + folder: this.fullFolder, file: this.name, size: this.size, mtime: this.mtime,