Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2019-01-24 19:47:09 +0300
committerJohn Cai <jcai@gitlab.com>2019-01-24 19:47:09 +0300
commit3d3b66fca4337e256625fa2625af434d1ec4609d (patch)
tree1439555303dc6444086546f67442f9b7864ad30a
parent30b67a9ff92b2bad70ff301660e1062200df2cef (diff)
fix list directories
-rw-r--r--internal/service/storage/listdirectories.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/service/storage/listdirectories.go b/internal/service/storage/listdirectories.go
index 18e3d7ba7..66d6310e2 100644
--- a/internal/service/storage/listdirectories.go
+++ b/internal/service/storage/listdirectories.go
@@ -7,7 +7,7 @@ import (
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/internal/helper"
- "gitlab.com/gitlab-org/gitaly/internal/helper/chunker"
+ "gitlab.com/gitlab-org/gitaly/internal/helper/chunk"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
@@ -20,7 +20,7 @@ func (s *server) ListDirectories(req *gitalypb.ListDirectoriesRequest, stream gi
storageDir = storageDir + "/"
maxDepth := dirDepth(storageDir) + req.GetDepth()
- sender := chunker.New(&dirSender{stream: stream})
+ sender := chunk.New(&dirSender{stream: stream})
err = filepath.Walk(storageDir, func(path string, info os.FileInfo, err error) error {
if err != nil {
@@ -61,8 +61,8 @@ type dirSender struct {
dirs []string
}
-func (s *dirSender) Reset() { s.dirs = nil }
-func (s *dirSender) Append(it chunker.Item) { s.dirs = append(s.dirs, it.(string)) }
+func (s *dirSender) Reset() { s.dirs = nil }
+func (s *dirSender) Append(it chunk.Item) { s.dirs = append(s.dirs, it.(string)) }
func (s *dirSender) Send() error {
return s.stream.Send(&gitalypb.ListDirectoriesResponse{Paths: s.dirs})
}