src/backup.rs: define INDEX_BLOB_NAME here

This commit is contained in:
Dietmar Maurer 2019-09-03 13:15:44 +02:00
parent df65bd3da6
commit 36493d4d7e
2 changed files with 2 additions and 2 deletions

View File

@ -103,6 +103,8 @@
//!
//! Not sure if this is better. TODO
pub const INDEX_BLOB_NAME: &str = "index.json.blob";
#[macro_export]
macro_rules! PROXMOX_BACKUP_PROTOCOL_ID_V1 {
() => { "proxmox-backup-protocol-v1" }

View File

@ -918,8 +918,6 @@ async fn restore_do(param: Value) -> Result<Value, Error> {
.custom_flags(libc::O_TMPFILE)
.open("/tmp")?;
const INDEX_BLOB_NAME: &str = "index.json.blob";
let index_data = client.download(INDEX_BLOB_NAME, Vec::with_capacity(64*1024)).await?;
let blob = DataBlob::from_raw(index_data)?;
blob.verify_crc()?;