diff --git a/counterparty-core/counterpartycore/server.py b/counterparty-core/counterpartycore/server.py index 235d245d9..087c3358f 100755 --- a/counterparty-core/counterpartycore/server.py +++ b/counterparty-core/counterpartycore/server.py @@ -1042,10 +1042,13 @@ def bootstrap_progress(blocknum, blocksize, totalsize): tar_file.extractall(path=config.DATA_DIR) # nosec B202 # noqa: S202 assert os.path.exists(ledger_database_path) - assert os.path.exists(api_database_path) + assert os.path.exists(api_database_path) or os.path.exists(old_api_database_path) # user and group have "rw" access os.chmod(ledger_database_path, 0o660) # nosec B103 - os.chmod(api_database_path, 0o660) # nosec B103 + if os.path.exists(api_database_path): + os.chmod(api_database_path, 0o660) # nosec B103 + if os.path.exists(old_api_database_path): + os.chmod(old_api_database_path, 0o660) # nosec B103 with log.Spinner("Cleaning up..."): os.remove(tarball_path)