# HG changeset patch # User Olaf Wintermann # Date 1628426426 -7200 # Node ID b0eb645cd26e622c58173d9af0fd3cf330bc2fc7 # Parent e0358fa1a3b12bc7006d3ee48f290a74b9fc32b8 fix error in dav add-user, if .dav dir doesn't exists diff -r e0358fa1a3b1 -r b0eb645cd26e dav/config.c --- a/dav/config.c Sun Aug 08 12:45:31 2021 +0200 +++ b/dav/config.c Sun Aug 08 14:40:26 2021 +0200 @@ -808,6 +808,10 @@ } int pwdstore_save(PwdStore *pwdstore) { + if(check_config_dir()) { + return 1; + } + char *pwfile = util_concat_path(ENV_HOME, ".dav/secrets.crypt"); int ret = pwdstore_store(pwdstore, pwfile); free(pwfile); diff -r e0358fa1a3b1 -r b0eb645cd26e dav/main.c --- a/dav/main.c Sun Aug 08 12:45:31 2021 +0200 +++ b/dav/main.c Sun Aug 08 14:40:26 2021 +0200 @@ -2903,7 +2903,7 @@ } int ret = 1; - if(user && password) { + if(user && password) { pwdstore_put_index(secrets, id, locations); pwdstore_put(secrets, id, user, password); ret = pwdstore_save(secrets);