add DirLister interface

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-02-15 20:53:56 +01:00
parent c60eb050ef
commit 1ff55bbfa7
35 changed files with 1362 additions and 669 deletions

View File

@@ -213,12 +213,12 @@ func (s *httpdServer) readBrowsableShareContents(w http.ResponseWriter, r *http.
}
defer common.Connections.Remove(connection.GetID())
contents, err := connection.ReadDir(name)
lister, err := connection.ReadDir(name)
if err != nil {
sendAPIResponse(w, r, err, "Unable to get directory contents", getMappedStatusCode(err))
sendAPIResponse(w, r, err, "Unable to get directory lister", getMappedStatusCode(err))
return
}
renderAPIDirContents(w, r, contents, true)
renderAPIDirContents(w, lister, true)
}
func (s *httpdServer) downloadBrowsableSharedFile(w http.ResponseWriter, r *http.Request) {