} else if stat.IsDir() && !strings.HasSuffix(r.URL.Path, "/") {
h.seeOtherWithCookie(w, r, basename+"/", credentialsOK)
} else if stat.IsDir() {
- h.serveDirectory(w, r, collection, fs, openPath, stripParts)
+ h.serveDirectory(w, r, collection.Name, fs, openPath, stripParts)
} else {
http.ServeContent(w, r, basename, stat.ModTime(), f)
if int64(w.WroteBodyBytes()) != stat.Size() {
</STYLE>
</HEAD>
<BODY>
-<H1>{{ .Collection.Name }}</H1>
+<H1>{{ .CollectionName }}</H1>
<P>This collection of data files is being shared with you through
Arvados. You can download individual files listed below. To download
Size int64
}
-func (h *handler) serveDirectory(w http.ResponseWriter, r *http.Request, collection *arvados.Collection, fs http.FileSystem, base string, stripParts int) {
+func (h *handler) serveDirectory(w http.ResponseWriter, r *http.Request, collectionName string, fs http.FileSystem, base string, stripParts int) {
var files []fileListEnt
var walk func(string) error
if !strings.HasSuffix(base, "/") {
})
w.WriteHeader(http.StatusOK)
tmpl.Execute(w, map[string]interface{}{
- "Collection": collection,
- "Files": files,
- "Request": r,
- "StripParts": stripParts,
+ "CollectionName": collectionName,
+ "Files": files,
+ "Request": r,
+ "StripParts": stripParts,
})
}