Merge pull request #7080 from nextcloud/enh/noid/remove-delete-logic

borg-init: remove unnecessary delete logic
This commit is contained in:
Simon L. 2025-11-06 12:00:03 +01:00 committed by GitHub
commit 6f9adffd41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,11 +138,6 @@ if [ "$BORG_MODE" = backup ]; then
NEW_REPOSITORY=1 NEW_REPOSITORY=1
if ! borg init --debug --encryption=repokey-blake2; then if ! borg init --debug --encryption=repokey-blake2; then
echo "Could not initialize borg repository." echo "Could not initialize borg repository."
if [ -z "$BORG_REMOTE_REPO" ]; then
# Originally we checked for presence of the config file instead of calling `borg info`. Likely `borg info`
# will error on a partially initialized repo, so this line is probably no longer necessary
rm -f "$BORG_BACKUP_DIRECTORY/config"
fi
exit 1 exit 1
fi fi