mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
rest backend: Allow null value in json
This commit is contained in:
parent
ea64c351d8
commit
eec8513bef
@ -191,7 +191,8 @@ impl ReadBackend for RestBackend {
|
||||
.header("Accept", "application/vnd.x.restic.rest.v2")
|
||||
.send()?
|
||||
.check_error()?
|
||||
.json::<Vec<ListEntry>>()?;
|
||||
.json::<Option<Vec<ListEntry>>>()? // use Option to be handle null json value
|
||||
.unwrap_or_default();
|
||||
Ok(list
|
||||
.into_iter()
|
||||
.filter_map(|i| match Id::from_hex(&i.name) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user