fix error when no backup
This commit is contained in:
		@@ -188,7 +188,14 @@ fn backup_info(
 | 
			
		||||
            };
 | 
			
		||||
            serde_json::to_string(&wbh)?
 | 
			
		||||
        }
 | 
			
		||||
        Err(_) => "{\"error\":\"Header could not be parsed\"".to_owned(),
 | 
			
		||||
        Err(_) => {
 | 
			
		||||
            //TODO make better
 | 
			
		||||
            let wbh = WebBackupHeader {
 | 
			
		||||
                timestamp: "no backup".to_owned(),
 | 
			
		||||
                size: 0,
 | 
			
		||||
            };
 | 
			
		||||
            serde_json::to_string(&wbh)?
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    anyhow::Ok(Some(json))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user