[Pkg-owncloud-commits] [owncloud-client] 314/498: vio_local: Properly detect if files are hidden.

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit e0abbc0b836ee117e42564595feb0cb2ff04777f
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Wed Jul 8 17:14:05 2015 +0200

    vio_local: Properly detect if files are hidden.
    
    On Linux and Mac, check for the leading dot. On Windows,
    there is an flag set in the result struct of fetFileInformationByHandle.
---
 csync/src/vio/csync_vio_local_win.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/csync/src/vio/csync_vio_local_win.c b/csync/src/vio/csync_vio_local_win.c
index de08441..8f55356 100644
--- a/csync/src/vio/csync_vio_local_win.c
+++ b/csync/src/vio/csync_vio_local_win.c
@@ -224,7 +224,12 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
         buf->type = CSYNC_VIO_FILE_TYPE_REGULAR;
         break;
     } while (0);
-    /* TODO Do we want to parse for CSYNC_VIO_FILE_FLAGS_HIDDEN ? */
+
+    /* Check for the hidden flag */
+    if( fileInfo.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN ) {
+        buf->flags |= CSYNC_VIO_FILE_FLAGS_HIDDEN;
+    }
+
     buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_FLAGS;
     buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list