added back anchor and selfheal broken chunks
This commit is contained in:
parent
fd035148bb
commit
6122768619
8 changed files with 65 additions and 44 deletions
|
|
@ -25,9 +25,10 @@ const (
|
|||
)
|
||||
|
||||
type data struct {
|
||||
QuotaCur float64
|
||||
QuotaMax float64
|
||||
Paths dirContents
|
||||
QuotaCur float64
|
||||
QuotaMax float64
|
||||
Paths dirContents
|
||||
PathAnchor string
|
||||
}
|
||||
|
||||
type FileServer struct {
|
||||
|
|
@ -136,7 +137,7 @@ func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
h.Del("Last-Modified")
|
||||
|
||||
paths, err := i.GetPaths(p, fs.fs, false)
|
||||
paths, pathAnchor, err := i.GetPaths(p, fs.fs, false)
|
||||
if err == io.EOF {
|
||||
w.WriteHeader(i.Status())
|
||||
return
|
||||
|
|
@ -148,7 +149,7 @@ func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
h.Set(csp, indexCSP)
|
||||
|
||||
w.WriteHeader(i.Status())
|
||||
err = index.Execute(w, data{Paths: paths})
|
||||
err = index.Execute(w, data{Paths: paths, PathAnchor: pathAnchor})
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue