diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-31 01:20:35 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-31 01:20:35 +0200 |
commit | b1ae8341655e7af388fc203392151890478ae086 (patch) | |
tree | 429276cdf34455c113863c84c49f7d7875821cf1 /storage/connect/plugutil.c | |
parent | fe3cbcdffa6d419bcc3658fb6dda9ea371b19d35 (diff) | |
download | mariadb-git-b1ae8341655e7af388fc203392151890478ae086.tar.gz |
- Fix using ~ in file name on Linux
modified:
storage/connect/osutil.c
storage/connect/plugutil.c
- Fix using fmt uninitialized in Tabcolumns
modified:
storage/connect/tabutil.cpp
- Suppress gcc warning
modified:
storage/connect/ha_connect.cc
Diffstat (limited to 'storage/connect/plugutil.c')
-rw-r--r-- | storage/connect/plugutil.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/storage/connect/plugutil.c b/storage/connect/plugutil.c index 489b0555a79..cc06a3da96a 100644 --- a/storage/connect/plugutil.c +++ b/storage/connect/plugutil.c @@ -255,7 +255,20 @@ LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath) strcpy(pBuff, FileName); // FileName includes absolute path return pBuff; } // endif - + +#if !defined(WIN32) + if (*FileName == '~') { + if (_fullpath(pBuff, FileName, _MAX_PATH)) { + if (trace > 1) + htrc("pbuff='%s'\n", pBuff); + + return pBuff; + } else + return FileName; // Error, return unchanged name + + } // endif FileName +#endif // !WIN32 + if (strcmp(prefix, ".") && !PlugIsAbsolutePath(defpath)) { char tmp[_MAX_PATH]; |