chore: undo hidden arg changes
This commit is contained in:
parent
68def1c1d9
commit
7eaa6f2484
2 changed files with 4 additions and 7 deletions
|
@ -52,7 +52,7 @@ OPTIONS:
|
||||||
-b, --bind <addr>... Specify bind address
|
-b, --bind <addr>... Specify bind address
|
||||||
-p, --port <port> Specify port to listen on [default: 5000]
|
-p, --port <port> Specify port to listen on [default: 5000]
|
||||||
--path-prefix <path> Specify a path prefix
|
--path-prefix <path> Specify a path prefix
|
||||||
--hidden <value>... Hide paths from directory listings
|
--hidden <value> Hide paths from directory listings, separated by `,`
|
||||||
-a, --auth <rule>... Add auth for path
|
-a, --auth <rule>... Add auth for path
|
||||||
--auth-method <value> Select auth method [default: digest] [possible values: basic, digest]
|
--auth-method <value> Select auth method [default: digest] [possible values: basic, digest]
|
||||||
-A, --allow-all Allow all operations
|
-A, --allow-all Allow all operations
|
||||||
|
|
|
@ -57,10 +57,7 @@ pub fn build_cli() -> Command<'static> {
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("hidden")
|
Arg::new("hidden")
|
||||||
.long("hidden")
|
.long("hidden")
|
||||||
.help("Hide paths from directory listings")
|
.help("Hide paths from directory listings, separated by `,`")
|
||||||
.multiple_values(true)
|
|
||||||
.value_delimiter(',')
|
|
||||||
.action(ArgAction::Append)
|
|
||||||
.value_name("value"),
|
.value_name("value"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
|
@ -220,8 +217,8 @@ impl Args {
|
||||||
format!("/{}/", &encode_uri(&path_prefix))
|
format!("/{}/", &encode_uri(&path_prefix))
|
||||||
};
|
};
|
||||||
let hidden: Vec<String> = matches
|
let hidden: Vec<String> = matches
|
||||||
.values_of("hidden")
|
.value_of("hidden")
|
||||||
.map(|v| v.map(|v| v.to_string()).collect())
|
.map(|v| v.split(',').map(|x| x.to_string()).collect())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let enable_cors = matches.is_present("enable-cors");
|
let enable_cors = matches.is_present("enable-cors");
|
||||||
let auth: Vec<&str> = matches
|
let auth: Vec<&str> = matches
|
||||||
|
|
Loading…
Reference in a new issue