From 41f35c9e82b901dc531f5345b349bf418b25ae1f Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 3 Aug 2015 22:20:05 -0700 Subject: [PATCH] Fix a really bad bug, avoid over-writing targetClnt URL(), copy the pointer properly --- mirror-url.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirror-url.go b/mirror-url.go index 9ac058a0..f1dd621f 100644 --- a/mirror-url.go +++ b/mirror-url.go @@ -165,7 +165,7 @@ func deltaSourceTargets(sourceClnt client.Client, targetClnts []client.Client) < if !targetTrie.Match(patricia.Prefix(matchName)) { sourceURLDelimited := sourceClnt.URL().String()[:strings.LastIndex(sourceClnt.URL().String(), string(sourceClnt.URL().Separator))+1] - newTargetURLParse := targetClnts[i].URL() + newTargetURLParse := *targetClnts[i].URL() newTargetURLParse.Path = filepath.Join(newTargetURLParse.Path, matchName) sourceContent.Size = sourceTrie.Get(patricia.Prefix(matchName)).(int64) sourceContent.Name = sourceURLDelimited + matchName