fix: call parameter error

This commit is contained in:
huzibaca 2024-11-14 03:16:32 +08:00
parent d0f907f349
commit b9bb79b4dc
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302

View File

@ -84,7 +84,7 @@ impl WebDavClient {
pub async fn download(&self, filename: String, storage_path: PathBuf) -> Result<(), Error> {
let client = self.get_client().await?;
let path = format!("{}/{}", dirs::BACKUP_DIR, filename);
let response = client.get(&path.as_str()).await?;
let response = client.get(path.as_str()).await?;
let content = response.bytes().await?;
fs::write(&storage_path, &content)?;
Ok(())