commit 649ec1abdc4c9af4f0a43cfbf0df833d825ba57e
parent d30b161cc120dcd0aab229c528d56067cf66918f
Author: breadcat <breadcat@users.noreply.github.com>
Date: Wed, 25 Mar 2026 00:45:25 +0000
Relative file fixes
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include-cbz.go b/include-cbz.go
@@ -297,7 +297,7 @@ func cbzViewerHandler(w http.ResponseWriter, r *http.Request) {
return
}
- cbzPath := filepath.Join(config.UploadDir, f.Filename)
+ cbzPath := filepath.Join(config.UploadDir, f.Path)
// Check if requesting a specific image
if len(parts) >= 3 && parts[1] == "image" {
diff --git a/include-files.go b/include-files.go
@@ -73,7 +73,7 @@ func fileDeleteHandler(w http.ResponseWriter, r *http.Request, parts []string) {
return
}
- if err = os.Remove(currentFile.Path); err != nil {
+ if err = os.Remove(filepath.Join(config.UploadDir, currentFile.Path)); err != nil {
log.Printf("Warning: Failed to delete physical file %s: %v", currentFile.Path, err)
}