mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Merge of patch for bug#16066243 from mysql-5.1.
This commit is contained in:
commit
31a720abbd
1 changed files with 3 additions and 2 deletions
|
@ -96,7 +96,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
|
|||
MEM_ROOT *names_storage;
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
char tmp_path[FN_REFLEN+1],*tmp_file;
|
||||
char tmp_path[FN_REFLEN + 2], *tmp_file;
|
||||
char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1];
|
||||
|
||||
DBUG_ENTER("my_dir");
|
||||
|
@ -197,10 +197,11 @@ char * directory_file_name (char * dst, const char *src)
|
|||
{
|
||||
/* Process as Unix format: just remove test the final slash. */
|
||||
char *end;
|
||||
DBUG_ASSERT(strlen(src) < (FN_REFLEN + 1));
|
||||
|
||||
if (src[0] == 0)
|
||||
src= (char*) "."; /* Use empty as current */
|
||||
end=strmov(dst, src);
|
||||
end= strnmov(dst, src, FN_REFLEN + 1);
|
||||
if (end[-1] != FN_LIBCHAR)
|
||||
{
|
||||
end[0]=FN_LIBCHAR; /* Add last '/' */
|
||||
|
|
Loading…
Add table
Reference in a new issue