aboutsummaryrefslogtreecommitdiffstats
path: root/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'api.go')
-rw-r--r--api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api.go b/api.go
index 2e9df52..9edf618 100644
--- a/api.go
+++ b/api.go
@@ -17,7 +17,7 @@ import (
)
func handleFile(w http.ResponseWriter, r *http.Request) {
- f, hash, size, modtime, err := storage.Get(strings.TrimRight(r.URL.Path, "/"))
+ f, hash, size, modtime, err := storage.Get(strings.TrimLeft(r.URL.Path, "/"))
if err != nil {
if _, ok := err.(ErrNotFound); ok {
http.Error(w, err.Error(), http.StatusNotFound)