filer: list diretory pagination make up for the expired entries

This commit is contained in:
Chris Lu
2020-03-09 23:28:01 -07:00
parent e6de42f888
commit d214cefc2e
8 changed files with 30 additions and 15 deletions

View File

@@ -32,7 +32,7 @@ func (fs *FilerServer) listDirectoryHandler(w http.ResponseWriter, r *http.Reque
lastFileName := r.FormValue("lastFileName")
entries, expiredCount, err := fs.filer.ListDirectoryEntries(context.Background(), filer2.FullPath(path), lastFileName, false, limit)
entries, err := fs.filer.ListDirectoryEntries(context.Background(), filer2.FullPath(path), lastFileName, false, limit)
if err != nil {
glog.V(0).Infof("listDirectory %s %s %d: %s", path, lastFileName, limit, err)
@@ -40,7 +40,7 @@ func (fs *FilerServer) listDirectoryHandler(w http.ResponseWriter, r *http.Reque
return
}
shouldDisplayLoadMore := len(entries)+expiredCount == limit
shouldDisplayLoadMore := len(entries) == limit
if path == "/" {
path = ""
}