Skip to content

Commit

Permalink
adjust command calls to vfs changes in rustic_core
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome committed Jan 29, 2024
1 parent 6e80452 commit 75af2b8
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/commands/webdav.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,30 +69,23 @@ impl WebDavCmd {

let vfs = if let Some(snap) = &self.snap {
let node = repo.node_from_snapshot_path(snap, sn_filter)?;
Vfs::from_dirnode(node, file_access)
Vfs::from_dirnode(node)
} else {
let snapshots = repo.get_matching_snapshots(sn_filter)?;
let (latest, identical) = if self.symlinks {
(Latest::AsLink, IdenticalSnapshot::AsLink)
} else {
(Latest::AsDir, IdenticalSnapshot::AsDir)
};
Vfs::from_snapshots(
snapshots,
path_template,
time_template,
latest,
identical,
file_access,
)?
Vfs::from_snapshots(snapshots, &path_template, &time_template, latest, identical)?
};
let addr = self
.addr
.to_socket_addrs()?
.next()
.ok_or_else(|| anyhow!("no address given"))?;
let dav_server = DavHandler::builder()
.filesystem(vfs.into_webdav_fs(repo))
.filesystem(vfs.into_webdav_fs(repo, file_access))
.build_handler();

tokio::runtime::Builder::new_current_thread()
Expand Down

0 comments on commit 75af2b8

Please sign in to comment.