From cc7acba02b60d1bd82f0f8a26c319f94b226eec2 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 11 Oct 2015 20:45:50 +0200 Subject: [PATCH] Return the original backend ID on duplicate entries --- repository/repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/repository.go b/repository/repository.go index c6900f43f..57373cd2e 100644 --- a/repository/repository.go +++ b/repository/repository.go @@ -315,7 +315,7 @@ func (r *Repository) SaveAndEncrypt(t pack.BlobType, data []byte, id *backend.ID err = r.idx.StoreInProgress(t, *id) if err != nil { debug.Log("Repo.Save", "another goroutine is already working on %v (%v) does already exist", id.Str, t) - return backend.ID{}, nil + return *id, nil } // find suitable packer and add blob