summaryrefslogtreecommitdiff
path: root/mysys/default.c
diff options
context:
space:
mode:
authorTimothy Smith <timothy.smith@sun.com>2008-07-16 16:58:45 -0600
committerTimothy Smith <timothy.smith@sun.com>2008-07-16 16:58:45 -0600
commitaa5731dad97ec8ac95d2e4cdd43211460d546b29 (patch)
treecbda323162d279022dc25bd0b06a82563506b19a /mysys/default.c
parent3bcbaf6cbf18dc04ee2495cc6cd2bf8aa399ebb5 (diff)
downloadmariadb-git-aa5731dad97ec8ac95d2e4cdd43211460d546b29.tar.gz
Bug #38180 options are read from ~/my.cnf instead of ~/.my.cnf
Pull out some of unpack_dirname() into normalize_dirname(); this new function does not expand "~" to the home directory. Use this function in unpack_dirname(), and use it during init_default_directories() to remove duplicate entries without losing track of which directory is a user's home dir.
Diffstat (limited to 'mysys/default.c')
-rw-r--r--mysys/default.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mysys/default.c b/mysys/default.c
index b7eb963e395..b709b33e2f8 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -965,8 +965,7 @@ static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs)
char *p;
my_bool err __attribute__((unused));
- /* Normalize directory name */
- len= unpack_dirname(buf, dir);
+ len= normalize_dirname(buf, dir);
if (!(p= strmake_root(alloc, buf, len)))
return 1; /* Failure */
/* Should never fail if DEFAULT_DIRS_SIZE is correct size */