From 3d3bb887453d84ef8561e5c8e97b17c9dc51a8e8 Mon Sep 17 00:00:00 2001
From: Michael Eischer <michael.eischer@fau.de>
Date: Thu, 8 Jun 2023 16:21:59 +0200
Subject: [PATCH] b2: remove duplicate check for config file during repository
 creation

No other backend implements that check. The check that a repository is
not yet initialized is handled by the Repository later on.
---
 internal/backend/b2/b2.go | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/internal/backend/b2/b2.go b/internal/backend/b2/b2.go
index 3560cca49..700fff099 100644
--- a/internal/backend/b2/b2.go
+++ b/internal/backend/b2/b2.go
@@ -147,16 +147,6 @@ func Create(ctx context.Context, cfg Config, rt http.RoundTripper) (restic.Backe
 		},
 		listMaxItems: defaultListMaxItems,
 	}
-
-	_, err = be.Stat(ctx, restic.Handle{Type: restic.ConfigFile})
-	if err != nil && !be.IsNotExist(err) {
-		return nil, err
-	}
-
-	if err == nil {
-		return nil, errors.New("config already exists")
-	}
-
 	return be, nil
 }