diff options
author | reggie@mdk10.(none) <> | 2005-03-15 11:33:06 -0600 |
---|---|---|
committer | reggie@mdk10.(none) <> | 2005-03-15 11:33:06 -0600 |
commit | 887f2a53fee044ad02e9592c4ad3583d2876848f (patch) | |
tree | 80bde2d3f063b7293d6d5baaf9df98a3f942a027 /sql/sql_show.cc | |
parent | 75e1b9e7652707568d5be014bcd23848d0425ce4 (diff) | |
download | mariadb-git-887f2a53fee044ad02e9592c4ad3583d2876848f.tar.gz |
Bug #6660 mysqldump creates bad pathnames on Windows
This is a modifiction of my previous patch after receiving feedback. This is a better way to fix the problem. With this patch, data directory and index directory will use only forward slashes (/) when on Windows.
mysqldump.c:
Removed fixPaths routine. Was improper fix for bug #6660
sql_show.cc:
Changed append_directory to convert backslashes to foward slashes when on Windows.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 8d741b4dc67..a85a6f92d70 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1227,7 +1227,16 @@ static void append_directory(THD *thd, String *packet, const char *dir_type, packet->append(' '); packet->append(dir_type); packet->append(" DIRECTORY='", 12); +#ifdef __WIN__ + char *winfilename = strdup(filename); + for (uint i=0; i < length; i++) + if (winfilename[i] == '\\') + winfilename[i] = '/'; + packet->append(winfilename, length); + free(winfilename); +#else packet->append(filename, length); +#endif packet->append('\''); } } |