From 6a6f3718a3f90b71fd528b202854a374e65b5886 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Tue, 16 Jul 2019 16:50:18 +0900 Subject: [PATCH] Do not attempt to delete block folder if failing --- contrib/FastSync/load-utxo-set.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/FastSync/load-utxo-set.sh b/contrib/FastSync/load-utxo-set.sh index b8e0461..f1c5ccd 100755 --- a/contrib/FastSync/load-utxo-set.sh +++ b/contrib/FastSync/load-utxo-set.sh @@ -82,7 +82,7 @@ if [[ $NBITCOIN_NETWORK == "testnet" ]]; then fi NETWORK_DIRECTORY="$BITCOIN_DATA_DIR/$NETWORK_DIRECTORY" -[ -d "$NETWORK_DIRECTORY/blocks" ] && rm -rf "$NETWORK_DIRECTORY/blocks" +[ -d "$NETWORK_DIRECTORY/blocks" ] && ( rm -rf "$NETWORK_DIRECTORY/blocks" || rm -rf $NETWORK_DIRECTORY/blocks/* ) [ -d "$NETWORK_DIRECTORY/chainstate" ] && rm -rf "$NETWORK_DIRECTORY/chainstate" [ ! -d "$NETWORK_DIRECTORY" ] && mkdir "$NETWORK_DIRECTORY"