Merge pull request #4004 from owncloud/fix_hidden_detection
authorKlaas Freitag <freitag@owncloud.com>
Wed, 28 Oct 2015 08:28:35 +0000 (09:28 +0100)
committerKlaas Freitag <freitag@owncloud.com>
Wed, 28 Oct 2015 08:28:35 +0000 (09:28 +0100)
Fix hidden detection

1  2 
csync/src/csync_update.c
src/libsync/discoveryphase.cpp

index 779f83b5954ba78cd5ad626972700d8540569972,49546d52b1076194d18e7eb909e5d7ca2e181df3..4945d44accd6bb2816f039d74930e00749f1ecba
@@@ -741,8 -747,19 +741,18 @@@ int csync_ftw(CSYNC *ctx, const char *u
          res = 0;
      }
  
+     /* for non windows platforms, detect if the filename starts with a .
+      * and if so, it's a hidden file. For windows, the hidden state is
+      * discovered within the vio local stat function.
+      */
+ #ifndef _WIN32
+     if( d_name[0] == '.' ) {
+         fs->flags |= CSYNC_VIO_FILE_FLAGS_HIDDEN;
+     }
+ #endif
      if( res == 0) {
 -      switch (fs->type) {
 +      switch (dirent->type) {
          case CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK:
            flag = CSYNC_FTW_FLAG_SLINK;
            break;
Simple merge