From 98a5cf648b36755c43e830cc0ddcf4e59eb1aa06 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 6 Jun 2015 21:49:48 -0700 Subject: [PATCH] Move diff also away from prefixed url --- diff.go | 7 ------- pkg/client/s3/s3_test.go | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/diff.go b/diff.go index 2d34e7ae..90e098af 100644 --- a/diff.go +++ b/diff.go @@ -18,7 +18,6 @@ package main import ( "path/filepath" - "strings" "github.com/minio/mc/pkg/client" "github.com/minio/minio/pkg/iodine" @@ -114,12 +113,6 @@ func dodiffdirs(firstClnt client.Client, firstURL, secondURL string, recursive b } return } - if recursive { - // this special handling is necessary since we are sending back absolute paths with in ListRecursive() - // - // To be consistent we have to filter them out - contentCh.Content.Name = strings.TrimPrefix(contentCh.Content.Name, strings.TrimSuffix(firstURL, "/")+"/") - } newFirstURL, err := urlJoinPath(firstURL, contentCh.Content.Name) if err != nil { ch <- diff{ diff --git a/pkg/client/s3/s3_test.go b/pkg/client/s3/s3_test.go index e002db00..face1eef 100644 --- a/pkg/client/s3/s3_test.go +++ b/pkg/client/s3/s3_test.go @@ -141,7 +141,7 @@ func (s *MySuite) TestBucketOperations(c *C) { err = s3c.SetBucketACL("public-read-write") c.Assert(err, IsNil) - conf.HostURL = server.URL + "/" + conf.HostURL = server.URL + delimiter s3c, err = New(conf) c.Assert(err, IsNil)