diff options
author | unknown <msvensson@neptunus.(none)> | 2006-03-24 12:33:11 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-03-24 12:33:11 +0100 |
commit | e65c4d22974170b2df977129cee04483fdabe696 (patch) | |
tree | 8d516cfc7e94b764277dddfcac0419f317e818e6 /mysys | |
parent | 045d42e53f2527a2fdbcef5596355f01ba8a4905 (diff) | |
parent | f97d76ac1cf7a46d49a293da2cd4b68e903fd4ca (diff) | |
download | mariadb-git-e65c4d22974170b2df977129cee04483fdabe696.tar.gz |
Merge 192.168.0.100:mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.1
client/mysqltest.c:
Auto merged
include/config-win.h:
Auto merged
include/m_ctype.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/subselect.result:
Auto merged
sql/item_func.cc:
Auto merged
sql/opt_range.cc:
Auto merged
strings/ctype-bin.c:
Auto merged
strings/ctype-euc_kr.c:
Auto merged
strings/ctype-gb2312.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_lib.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/mysys/my_lib.c b/mysys/my_lib.c index 4ca343064d3..522fa56cbf1 100644 --- a/mysys/my_lib.c +++ b/mysys/my_lib.c @@ -398,14 +398,6 @@ MY_DIR *my_dir(const char *path, myf MyFlags) tmp_file[2]='*'; tmp_file[3]='\0'; -#ifdef __BORLANDC__ - if ((handle= findfirst(tmp_path,&find,0)) == -1L) - goto error; -#else - if ((handle=_findfirst(tmp_path,&find)) == -1L) - goto error; -#endif - if (!(buffer= my_malloc(ALIGN_SIZE(sizeof(MY_DIR)) + ALIGN_SIZE(sizeof(DYNAMIC_ARRAY)) + sizeof(MEM_ROOT), MyFlags))) @@ -425,7 +417,23 @@ MY_DIR *my_dir(const char *path, myf MyFlags) /* MY_DIR structure is allocated and completly initialized at this point */ result= (MY_DIR*)buffer; - + +#ifdef __BORLANDC__ + if ((handle= findfirst(tmp_path,&find,0)) == -1L) +#else + if ((handle=_findfirst(tmp_path,&find)) == -1L) +#endif + { + DBUG_PRINT("info", ("find_first returned error")); + if (errno != EINVAL) + goto error; + /* + Could not read the directory, no read access. + Probably because by "chmod -r". + continue and return zero files in dir + */ + } + do { #ifdef __BORLANDC__ |