Browse Source

fix when no files in filer

pull/753/head 0.98
Chris Lu 6 years ago
parent
commit
41aba0c02c
  1. 4
      weed/server/filer_server_handlers_read.go

4
weed/server/filer_server_handlers_read.go

@ -23,6 +23,10 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
entry, err := fs.filer.FindEntry(filer2.FullPath(path))
if err != nil {
if path == "/" {
fs.listDirectoryHandler(w, r)
return
}
glog.V(1).Infof("Not found %s: %v", path, err)
w.WriteHeader(http.StatusNotFound)
return

Loading…
Cancel
Save