mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 23:49:15 +01:00
serve restic: When listing return empty list instead of 'null'
This commit is contained in:
parent
5114b11d6f
commit
fa003e89b6
@ -362,7 +362,9 @@ func (ls *listItems) add(entry fs.DirEntry) {
|
||||
func (s *server) listObjects(w http.ResponseWriter, r *http.Request, remote string) {
|
||||
fs.Debugf(remote, "list request")
|
||||
|
||||
var ls listItems
|
||||
// make sure an empty list is returned, and not a 'nil' value
|
||||
ls := listItems{}
|
||||
|
||||
err := walk.Walk(s.f, remote, true, -1, func(path string, entries fs.DirEntries, err error) error {
|
||||
if err == nil {
|
||||
for _, entry := range entries {
|
||||
|
Loading…
Reference in New Issue
Block a user