summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-07-01 15:57:45 +0300
committerunknown <monty@mashka.mysql.fi>2003-07-01 15:57:45 +0300
commitc672b5d04b4828a194df6e1a99c8454b07dc2400 (patch)
treeeeea6a24bfdcb6f6e2e163c4da948e52544e90de /mysys
parentda25c0337a596c8300af69b2f4e53c3cee526bc5 (diff)
parent14c8a0e536b6326a4ba759ba30377e8a9654b513 (diff)
downloadmariadb-git-c672b5d04b4828a194df6e1a99c8454b07dc2400.tar.gz
merge
acinclude.m4: Auto merged mysql-test/r/subselect.result: Auto merged scripts/mysql_create_system_tables.sh: Auto merged sql/sql_class.h: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'mysys')
-rw-r--r--mysys/mf_loadpath.c6
-rw-r--r--mysys/my_symlink.c12
2 files changed, 10 insertions, 8 deletions
diff --git a/mysys/mf_loadpath.c b/mysys/mf_loadpath.c
index 291ad62e297..2c90d9f90a6 100644
--- a/mysys/mf_loadpath.c
+++ b/mysys/mf_loadpath.c
@@ -39,10 +39,10 @@ my_string my_load_path(my_string to, const char *path,
(is_prefix((gptr) path,FN_PARENTDIR)) ||
! own_path_prefix)
{
- if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)),MYF(0)))
- VOID(strcat(buff,path));
+ if (! my_getwd(buff,(uint) (FN_REFLEN+2-strlen(path)),MYF(0)))
+ VOID(strcat(buff,path+2));
else
- VOID(strmov(buff,path));
+ VOID(strmov(buff,path)); /* Return org file name */
}
else
VOID(strxmov(buff,own_path_prefix,path,NullS));
diff --git a/mysys/my_symlink.c b/mysys/my_symlink.c
index abef0096e28..b9468d42cfc 100644
--- a/mysys/my_symlink.c
+++ b/mysys/my_symlink.c
@@ -123,20 +123,22 @@ int my_realpath(char *to, const char *filename,
}
else
{
- /* Realpath didn't work; Use original name */
+ /*
+ Realpath didn't work; Use my_load_path() which is a poor substitute
+ original name but will at least be able to resolve paths that starts
+ with '.'.
+ */
DBUG_PRINT("error",("realpath failed with errno: %d", errno));
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_REALPATH, MYF(0), filename, my_errno);
- if (to != filename)
- strmov(to,filename);
+ my_load_path(to, filename, NullS);
result= -1;
}
}
DBUG_RETURN(result);
#else
- if (to != filename)
- strmov(to,filename);
+ my_load_path(to, filename, NullS);
return 0;
#endif
}