diff options
author | unknown <aivanov@mysql.com> | 2005-10-19 21:07:08 +0400 |
---|---|---|
committer | unknown <aivanov@mysql.com> | 2005-10-19 21:07:08 +0400 |
commit | 28421fe8ed9d2869b74b53f7732877e41b78440a (patch) | |
tree | 2106ee16f89e083e9771a41efbdd043c225f64cd /mysys | |
parent | c3ac502ab16db7118c4b1f2a70a300e6bd40af85 (diff) | |
parent | b59d565605269db0a1b39da5e2aa7b686c8ca87a (diff) | |
download | mariadb-git-28421fe8ed9d2869b74b53f7732877e41b78440a.tar.gz |
Merge mysql.com:/home/alexi/mysql-4.1
into mysql.com:/home/alexi/dev/mysql-4.1-4375
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_lib.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mysys/my_lib.c b/mysys/my_lib.c index c3b0b57e549..1908c70f407 100644 --- a/mysys/my_lib.c +++ b/mysys/my_lib.c @@ -427,6 +427,18 @@ MY_DIR *my_dir(const char *path, myf MyFlags) do { #ifdef __BORLANDC__ + attrib= find.ff_attrib; +#else + attrib= find.attrib; + /* + Do not show hidden and system files which Windows sometimes create. + Note. Because Borland's findfirst() is called with the third + argument = 0 hidden/system files are excluded from the search. + */ + if (attrib & (_A_HIDDEN | _A_SYSTEM)) + continue; +#endif +#ifdef __BORLANDC__ if (!(finfo.name= strdup_root(names_storage, find.ff_name))) goto error; #else @@ -442,11 +454,10 @@ MY_DIR *my_dir(const char *path, myf MyFlags) bzero(finfo.mystat, sizeof(MY_STAT)); #ifdef __BORLANDC__ finfo.mystat->st_size=find.ff_fsize; - mode=MY_S_IREAD; attrib=find.ff_attrib; #else finfo.mystat->st_size=find.size; - mode=MY_S_IREAD; attrib=find.attrib; #endif + mode=MY_S_IREAD; if (!(attrib & _A_RDONLY)) mode|=MY_S_IWRITE; if (attrib & _A_SUBDIR) |