summaryrefslogtreecommitdiff
path: root/mysql-test/my_manage.c
diff options
context:
space:
mode:
authorwax@kishkin.ru <>2005-02-02 19:53:49 +0500
committerwax@kishkin.ru <>2005-02-02 19:53:49 +0500
commitb93102422b399af1f32da0d95f744c5394e8056e (patch)
tree9301ca8c793bebb2821ffd5da3f5cb3cca9d4a54 /mysql-test/my_manage.c
parentea54b00e42011baed8b539d5bf6140a891ed55bd (diff)
downloadmariadb-git-b93102422b399af1f32da0d95f744c5394e8056e.tar.gz
WL#964
renamed client_test to mysql_client_test fixed name for lstat in removef() added mysql-debug.exe for Windows added enviroment variable MYSQL_CLIENT_TEST added cleaning directory before tests New BitKeeper file ``VC++Files/tests/mysql_client_test.dsp'' Delete: VC++Files/tests/client_test.dsp
Diffstat (limited to 'mysql-test/my_manage.c')
-rw-r--r--mysql-test/my_manage.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mysql-test/my_manage.c b/mysql-test/my_manage.c
index 5cd0013d7bb..88e68dfc27e 100644
--- a/mysql-test/my_manage.c
+++ b/mysql-test/my_manage.c
@@ -644,7 +644,7 @@ void del_tree(char *dir)
if (lstat(entry->d_name, &st) == -1)
{
/* FIXME error */
- return;
+ return;
}
if (S_ISDIR(st.st_mode))
#else
@@ -800,7 +800,15 @@ int removef(const char *format, ...)
#ifndef STRUCT_DIRENT_HAS_D_TYPE
struct stat st;
- if (lstat(entry->d_name, &st) == -1 && !fnmatch(p, entry->d_name,0))
+ /* create long name */
+ snprintf(temp, FN_REFLEN, "%s/%s", path, entry->d_name);
+
+ if (lstat(temp, &st) == -1)
+ {
+ return 1; /* Error couldn't lstat file */
+ }
+
+ if (!S_ISDIR(st.st_mode) && !fnmatch(p, entry->d_name,0))
#else
if (!S_ISDIR(entry->d_type) && !fnmatch(p, entry->d_name,0))
#endif