diff options
author | Gu Feng <flygoast@126.com> | 2014-11-16 00:09:52 +0800 |
---|---|---|
committer | Gu Feng <flygoast@126.com> | 2014-11-16 00:09:52 +0800 |
commit | 62ccf1cf0e13954ee5207bc6288afbc669247d14 (patch) | |
tree | c347db0043405ca2ac6343db13cdf6293bf764e7 /src | |
parent | Merge pull request #345 from weiss/last-pep-items (diff) |
Used current working home as base directory to config relative path.
When a config relative path specified, get_absolute_path would not
return an absolute path. The patch fixed it using current working
home as base directory.
Signed-off-by: Gu Feng <flygoast@126.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_config.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ejabberd_config.erl b/src/ejabberd_config.erl index dd1db765d..5b3b5ad1d 100644 --- a/src/ejabberd_config.erl +++ b/src/ejabberd_config.erl @@ -210,9 +210,8 @@ get_absolute_path(File) -> absolute -> File; relative -> - Config_path = get_ejabberd_config_path(), - Config_dir = filename:dirname(Config_path), - filename:absname_join(Config_dir, File) + {ok, Dir} = file:get_cwd(), + filename:absname_join(Dir, File) end. |