tagliatelle

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f94c951e7fae1acf6d9b325195033e229f934a55
parent 6065f567a9cb16092edc055d355fe20ed80a4ecf
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Wed, 22 Apr 2026 19:27:15 +0100

Fix regenerating thumbnails after relative path change

Diffstat:
Minclude-admin-thumbnails.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/include-admin-thumbnails.go b/include-admin-thumbnails.go @@ -165,6 +165,10 @@ func generateThumbnailHandler(w http.ResponseWriter, r *http.Request) { return } + if !filepath.IsAbs(path) { + path = filepath.Join(config.UploadDir, path) + } + if err = generateThumbnailAtTime(path, config.UploadDir, filename, timestamp); err != nil { log.Printf("Error: generateThumbnailHandler: failed to generate thumbnail for file id=%s at %s: %v", fileID, timestamp, err) http.Redirect(w, r, redirectBase+"?error="+url.QueryEscape("Failed to generate thumbnail: "+err.Error()), http.StatusSeeOther)