From 86737178381e37f1a02e82fe439351b08345a458 Mon Sep 17 00:00:00 2001 From: Christian Roeder Date: Wed, 14 May 2014 01:42:19 +0200 Subject: [PATCH] Allow tilde expansion for htpasswd file Call os.path.expanduser on the location given by the config parameter. This will allow to use settings like htpasswd_filename = ~/.config/radicale/users --- radicale/auth/htpasswd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radicale/auth/htpasswd.py b/radicale/auth/htpasswd.py index f3ef89d..006bde1 100644 --- a/radicale/auth/htpasswd.py +++ b/radicale/auth/htpasswd.py @@ -29,11 +29,12 @@ supported, but md5 is not (see ``htpasswd`` man page to understand why). import base64 import hashlib +import os from .. import config -FILENAME = config.get("auth", "htpasswd_filename") +FILENAME = os.path.expanduser(config.get("auth", "htpasswd_filename")) ENCRYPTION = config.get("auth", "htpasswd_encryption")