diff options
-rw-r--r-- | handle_repo_tree.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/handle_repo_tree.go b/handle_repo_tree.go index 26d7fd6..4c3eaa1 100644 --- a/handle_repo_tree.go +++ b/handle_repo_tree.go @@ -87,7 +87,7 @@ func handle_repo_tree(w http.ResponseWriter, r *http.Request) { } } - if raw_path_spec[len(raw_path_spec) - 1] != '/' { + if len(raw_path_spec) != 0 && raw_path_spec[len(raw_path_spec) - 1] != '/' { http.Redirect(w, r, path.Base(path_spec) + "/", http.StatusSeeOther) return } |