Skip to content

Commit

Permalink
--root argument honors fs_dav_provider configuration (#299)
Browse files Browse the repository at this point in the history
Close #298
  • Loading branch information
mar10 authored Oct 23, 2023
1 parent b084645 commit 2acd51d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wsgidav/server/server_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _init_command_line_options():
"--root",
dest="root_path",
action=FullExpandedPath,
help="path to a file system folder to publish as share '/'.",
help="path to a file system folder to publish for RW as share '/'.",
)
parser.add_argument(
"--auth",
Expand Down Expand Up @@ -347,7 +347,10 @@ def _init_config():

if cli_opts.get("root_path"):
root_path = os.path.abspath(cli_opts.get("root_path"))
config["provider_mapping"]["/"] = FilesystemProvider(root_path)
config["provider_mapping"]["/"] = FilesystemProvider(
root_path,
fs_opts=config.get("fs_dav_provider"),
)

if config["verbose"] >= 5:
# TODO: remove passwords from user_mapping
Expand Down

0 comments on commit 2acd51d

Please sign in to comment.