rename INDEX_BLOB_NAME to MANIFEST_BLOB_NAME
This commit is contained in:
parent
296c50ba3d
commit
ad6e5a6f51
@ -103,7 +103,7 @@
|
||||
//!
|
||||
//! Not sure if this is better. TODO
|
||||
|
||||
pub const INDEX_BLOB_NAME: &str = "index.json.blob";
|
||||
pub const MANIFEST_BLOB_NAME: &str = "index.json.blob";
|
||||
pub const CATALOG_BLOB_NAME: &str = "catalog.blob";
|
||||
|
||||
#[macro_export]
|
||||
|
@ -1052,7 +1052,7 @@ async fn restore_do(param: Value) -> Result<Value, Error> {
|
||||
|
||||
let backup_index = client.download_manifest().await?;
|
||||
|
||||
if server_archive_name == INDEX_BLOB_NAME {
|
||||
if server_archive_name == MANIFEST_BLOB_NAME {
|
||||
let backup_index_data = backup_index.to_string();
|
||||
if let Some(target) = target {
|
||||
file_set_contents(target, backup_index_data.as_bytes(), None)?;
|
||||
|
@ -123,7 +123,7 @@ impl BackupReader {
|
||||
/// Download backup manifest (index.json)
|
||||
pub async fn download_manifest(&self) -> Result<Value, Error> {
|
||||
|
||||
let raw_data = self.download(INDEX_BLOB_NAME, Vec::with_capacity(64*1024)).await?;
|
||||
let raw_data = self.download(MANIFEST_BLOB_NAME, Vec::with_capacity(64*1024)).await?;
|
||||
let blob = DataBlob::from_raw(raw_data)?;
|
||||
blob.verify_crc()?;
|
||||
let data = blob.decode(self.crypt_config.as_ref().map(Arc::as_ref))?;
|
||||
|
Loading…
Reference in New Issue
Block a user