use clap::crate_description;
use clap::{Arg, ArgMatches};
use std::env;
-use std::fs::canonicalize;
use std::net::SocketAddr;
use std::path::{Path, PathBuf};
)
.arg(
Arg::new("allow-delete")
- .long("allo-delete")
+ .long("allow-delete")
.help("Allow delete operation"),
)
.arg(
Arg::new("allow-symlink")
- .long("allo-symlink")
+ .long("allow-symlink")
.help("Allow symlink to directories/files outside root directory"),
)
.arg(
env::current_dir()
.and_then(|mut p| {
p.push(path); // If path is absolute, it replaces the current path.
- canonicalize(p)
+ std::fs::canonicalize(p)
})
.or_else(|err| {
bail!(
} else {
decoded_path.into_owned()
};
- let fullpath = self.args.path.join(&slashes_switched);
- Some(fullpath)
+ Some(self.args.path.join(&slashes_switched))
}
async fn to_pathitem<P: AsRef<Path>>(