From 0c4200306b722eb4188761703279df06147aaec9 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 11 Apr 2016 20:43:45 -0700 Subject: [PATCH] url: isURLPrefixExists() should use non-recursive mechanism. The reason is to avoid generating recursive requests while we are only concerned about the top level prefix that if it exists. --- client-fs.go | 2 +- client-url.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client-fs.go b/client-fs.go index 6402deab..77c23a01 100644 --- a/client-fs.go +++ b/client-fs.go @@ -44,7 +44,7 @@ const ( var ( // GOOS specific ignore list. ignoreFiles = map[string][]string{ - "darwin": []string{".DS_Store"}, + "darwin": {".DS_Store"}, // "default": []string{""}, } ) diff --git a/client-url.go b/client-url.go index 77a8a8a7..bae5e9df 100644 --- a/client-url.go +++ b/client-url.go @@ -216,7 +216,7 @@ func isURLPrefixExists(urlPrefix string, incomplete bool) bool { if err != nil { return false } - isRecursive := true + isRecursive := false isIncomplete := incomplete for entry := range clnt.List(isRecursive, isIncomplete) { return entry.Err == nil