Merge bk-internal:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
This commit is contained in:
commit
10633fd839
@ -384,11 +384,10 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
|
||||
DBUG_PRINT("my",("path: '%s' stat: %d MyFlags: %d",path,MyFlags));
|
||||
|
||||
/* Put LIB-CHAR as last path-character if not there */
|
||||
|
||||
tmp_file=tmp_path;
|
||||
if (!*path)
|
||||
*tmp_file++ ='.'; /* From current dir */
|
||||
tmp_file= strmov(tmp_file,path);
|
||||
tmp_file= strnmov(tmp_file, path, FN_REFLEN-5);
|
||||
if (tmp_file[-1] == FN_DEVCHAR)
|
||||
*tmp_file++= '.'; /* From current dev-dir */
|
||||
if (tmp_file[-1] != FN_LIBCHAR)
|
||||
@ -424,7 +423,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
|
||||
if ((handle=_findfirst(tmp_path,&find)) == -1L)
|
||||
#endif
|
||||
{
|
||||
DBUG_PRINT("info", ("find_first returned error"));
|
||||
DBUG_PRINT("info", ("findfirst returned error, errno: %d", errno));
|
||||
if (errno != EINVAL)
|
||||
goto error;
|
||||
/*
|
||||
@ -433,6 +432,8 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
|
||||
continue and return zero files in dir
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
do
|
||||
{
|
||||
@ -484,14 +485,15 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
|
||||
|
||||
if (push_dynamic(dir_entries_storage, (gptr)&finfo))
|
||||
goto error;
|
||||
|
||||
}
|
||||
#ifdef __BORLANDC__
|
||||
} while (findnext(&find) == 0);
|
||||
while (findnext(&find) == 0);
|
||||
#else
|
||||
} while (_findnext(handle,&find) == 0);
|
||||
while (_findnext(handle,&find) == 0);
|
||||
|
||||
_findclose(handle);
|
||||
#endif
|
||||
}
|
||||
|
||||
result->dir_entry= (FILEINFO *)dir_entries_storage->buffer;
|
||||
result->number_off_files= dir_entries_storage->elements;
|
||||
@ -499,6 +501,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
|
||||
if (!(MyFlags & MY_DONT_SORT))
|
||||
qsort((void *) result->dir_entry, result->number_off_files,
|
||||
sizeof(FILEINFO), (qsort_cmp) comp_names);
|
||||
DBUG_PRINT(exit, ("found %d files", result->number_off_files));
|
||||
DBUG_RETURN(result);
|
||||
error:
|
||||
my_errno=errno;
|
||||
|
Loading…
x
Reference in New Issue
Block a user