diff --git a/skaled/main.cpp b/skaled/main.cpp index d33635a2f..381cda01f 100644 --- a/skaled/main.cpp +++ b/skaled/main.cpp @@ -274,8 +274,9 @@ void downloadSnapshot( unsigned block_number, std::shared_ptr< SnapshotManager > throw std::runtime_error( strErrorDescription ); } } catch ( ... ) { - std::throw_with_nested( - std::runtime_error( cc::error( "Exception while downloading snapshot" ) ) ); + // remove partially downloaded snapshot + boost::filesystem::remove( saveTo ); + std::throw_with_nested( std::runtime_error( "Exception while downloading snapshot" ) ); } clog( VerbosityInfo, "downloadSnapshot" ) << cc::success( "Snapshot download success for block " )