diff options
author | unknown <guilhem@mysql.com> | 2004-07-05 19:07:26 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2004-07-05 19:07:26 +0200 |
commit | bdb3460fede3bf71416aca23b5b5490a87fe5097 (patch) | |
tree | 216fdade40f83ac46acb65730b8a1a1345220b60 /mysys/my_lib.c | |
parent | b30cd30a662762f7823749bd56d2dc7c67b330ce (diff) | |
download | mariadb-git-bdb3460fede3bf71416aca23b5b5490a87fe5097.tar.gz |
Windows-specific:
Fix for BUG#4375 "Windows specific directories are copied during
replication": in the Windows version of my_dir(), do not show hidden
or system files which Windows sometimes creates in the root directory
of drive (like RECYCLER and SYSTEM VOLUME INFORMATION directories) (so
this problem showed up only when the datadir was the root dir of a
drive).
This will make SHOW DATABASES display better, and will do no harm to
MySQL. For example, DROP DATABASE will not miss some files, as MySQL
creates no hidden or system files.
mysys/my_lib.c:
In my_dir(), do not show hidden or system files
which Windows sometimes creates.
Diffstat (limited to 'mysys/my_lib.c')
-rw-r--r-- | mysys/my_lib.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysys/my_lib.c b/mysys/my_lib.c index 055e00d2efc..21c558ed489 100644 --- a/mysys/my_lib.c +++ b/mysys/my_lib.c @@ -461,6 +461,15 @@ MY_DIR *my_dir(const char *path, myf MyFlags) else finfo.mystat= NULL; + /* + Do not show hidden or system files which Windows sometimes creates. We + would need to see how this can be achieved with a Borland compiler. + */ +#ifndef __BORLANDC__ + if (attrib & (_A_HIDDEN | _A_SYSTEM)) + continue; +#endif + if (push_dynamic(dir_entries_storage, (gptr)&finfo)) goto error; |