From e71c78ae84ef043f12198bf2584bda6130e26e88 Mon Sep 17 00:00:00 2001 From: Daniel Harte Date: Wed, 8 Jun 2016 07:09:50 +0000 Subject: [PATCH] cmd/syncthing: Remove folder limit on /rest/system/browse Previously limited to 10 results, now unlimited. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3279 LGTM: calmh, AudriusButkevicius --- cmd/syncthing/gui.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index 6a5448dfb..80375d60c 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -1148,14 +1148,11 @@ func (s *apiService) getSystemBrowse(w http.ResponseWriter, r *http.Request) { search = search + pathSeparator } subdirectories, _ := osutil.Glob(search + "*") - ret := make([]string, 0, 10) + ret := make([]string, 0, len(subdirectories)) for _, subdirectory := range subdirectories { info, err := os.Stat(subdirectory) if err == nil && info.IsDir() { ret = append(ret, subdirectory+pathSeparator) - if len(ret) > 9 { - break - } } }