From 4d1635828f3503b46e6449d29082b50171045e5e Mon Sep 17 00:00:00 2001 From: bitxeno Date: Mon, 4 Mar 2024 11:48:40 +0800 Subject: [PATCH] Add WEBDAV_ROOT environment variable (#962) --- README.md | 1 + src/main.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 73d01e1265..5dd1990c3b 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,7 @@ Options: --root Root directory path + [env: WEBDAV_ROOT=] [default: /] -w, --workdir diff --git a/src/main.rs b/src/main.rs index 27871fa096..83ba2cd1d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,7 +66,7 @@ struct Opt { #[arg(long, default_value = "600")] cache_ttl: u64, /// Root directory path - #[arg(long, default_value = "/")] + #[arg(long, env = "WEBDAV_ROOT", default_value = "/")] root: String, /// Working directory, refresh_token will be stored in there if specified #[arg(short = 'w', long)]