fix small mistake

This commit is contained in:
guochao 2024-12-19 01:27:14 +08:00
parent f49675a7b3
commit 09bb9c3e5d

View File

@ -193,6 +193,7 @@ func (server *Server) serveFile(w http.ResponseWriter, r *http.Request, path str
relPath, err := filepath.Rel(server.Storage.Local.Path, path) relPath, err := filepath.Rel(server.Storage.Local.Path, path)
if err != nil { if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest) http.Error(w, err.Error(), http.StatusBadRequest)
return
} }
accelPath := filepath.Join(location, relPath) accelPath := filepath.Join(location, relPath)