summaryrefslogtreecommitdiff
path: root/mysys/mf_pack.c
diff options
context:
space:
mode:
authormonty@donna.mysql.fi <>2001-05-29 13:46:17 +0300
committermonty@donna.mysql.fi <>2001-05-29 13:46:17 +0300
commit3dc4b35a05846484a5adcda092dda7ae9cfecfd7 (patch)
tree7f42d1149eac3fb84c4cbb7810d966b33a86fb72 /mysys/mf_pack.c
parent86eda127f780401ecd9d51e23f01ee984e1a5cf5 (diff)
downloadmariadb-git-3dc4b35a05846484a5adcda092dda7ae9cfecfd7.tar.gz
Fixed problems with decimals withing IF()
Force add of FN_LIBCHAR to symlinks on windows
Diffstat (limited to 'mysys/mf_pack.c')
-rw-r--r--mysys/mf_pack.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c
index c18d37888b8..b442af7e9e5 100644
--- a/mysys/mf_pack.c
+++ b/mysys/mf_pack.c
@@ -236,11 +236,16 @@ void symdirget(char *dir)
*pos++=temp; *pos=0; /* Restore old filename */
if (fp)
{
- if (fgets(buff, sizeof(buff), fp))
+ if (fgets(buff, sizeof(buff)-1, fp))
{
for (pos=strend(buff);
pos > buff && (iscntrl(pos[-1]) || isspace(pos[-1])) ;
pos --);
+
+ /* Ensure that the symlink ends with the directory symbol */
+ if (pos == buff || pos[-1] != FN_LIBCHAR)
+ *pos++=FN_LIBCHAR;
+
strmake(dir,buff, (uint) (pos-buff));
}
my_fclose(fp,MYF(0));