Merge pull request #2240 from ywk253100/170505_replica

Fix bug
This commit is contained in:
Daniel Jiang 2017-05-05 18:36:57 +08:00 committed by GitHub
commit 8c003e950b

View File

@ -90,7 +90,7 @@ func (d *Deleter) enter() (string, error) {
// delete repository // delete repository
if len(d.tags) == 0 { if len(d.tags) == 0 {
u := url + "?repo_name=" + d.repository u := url + d.repository + "/tags"
if err := del(u, d.dstUsr, d.dstPwd, d.insecure); err != nil { if err := del(u, d.dstUsr, d.dstPwd, d.insecure); err != nil {
if err == errNotFound { if err == errNotFound {
d.logger.Warningf("repository %s does not exist on %s", d.repository, d.dstURL) d.logger.Warningf("repository %s does not exist on %s", d.repository, d.dstURL)
@ -109,7 +109,7 @@ func (d *Deleter) enter() (string, error) {
// delele tags // delele tags
for _, tag := range d.tags { for _, tag := range d.tags {
u := url + "?repo_name=" + d.repository + "&tag=" + tag u := url + d.repository + "/tags/" + tag
if err := del(u, d.dstUsr, d.dstPwd, d.insecure); err != nil { if err := del(u, d.dstUsr, d.dstPwd, d.insecure); err != nil {
if err == errNotFound { if err == errNotFound {
d.logger.Warningf("repository %s does not exist on %s", d.repository, d.dstURL) d.logger.Warningf("repository %s does not exist on %s", d.repository, d.dstURL)