MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Alex Ivanov Date:October 18 2005 3:03pm
Subject:bk commit into 4.1 tree (aivanov:1.2475) BUG#4737
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of alexi. When alexi does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2475 05/10/18 19:02:55 aivanov@stripped +1 -0
  Fix for BUG#4375: Windows specific directories are copied
   during replication.
   Modified my_dir(). Now this function skips hidden and system
   files which sometimes are created by Windows.
   NOTE. The fix is similar to the previuos one (05 July 2004)
   except for correct setting of the 'attrib' variable value
   (within the previous fix this variable was left uninitialized
   when my_dir() was called with My_flags & MY_WANT_STAT == 0,
   which gave rise to the bug #4737).

  mysys/my_lib.c
    1.21 05/10/18 19:02:36 aivanov@stripped +13 -2
    Modified my_dir().
     Now this function skips hidden and system files
     which sometimes are created by Windows.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	aivanov
# Host:	mysql.creware.com
# Root:	/home/alexi/dev/mysql-4.1-4375

--- 1.20/mysys/my_lib.c	2004-08-24 19:03:12 +04:00
+++ 1.21/mysys/my_lib.c	2005-10-18 19:02:36 +04:00
@@ -427,6 +427,18 @@
   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 @@
       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)
Thread
bk commit into 4.1 tree (aivanov:1.2475) BUG#4737Alex Ivanov18 Oct