[Pkg-owncloud-commits] [owncloud-client] 376/470: local_vio_win: Fix handling files that have been deduplicated

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:25:28 UTC 2016


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 055c2ef73f84b68ebfbe0296fadef438981cba37
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Wed Apr 20 14:15:38 2016 +0200

    local_vio_win: Fix handling files that have been deduplicated
    
    as part of Windows SIS or Data Deduplication. Fixes #4056
---
 csync/src/vio/csync_vio_local_win.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/csync/src/vio/csync_vio_local_win.c b/csync/src/vio/csync_vio_local_win.c
index 7bf4033..f43393e 100644
--- a/csync/src/vio/csync_vio_local_win.c
+++ b/csync/src/vio/csync_vio_local_win.c
@@ -168,9 +168,14 @@ csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
   }
   file_stat->name = c_utf8_from_locale(handle->ffd.cFileName);
 
-  file_stat->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
-  if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT
-            && handle->ffd.dwReserved0 & IO_REPARSE_TAG_SYMLINK) {
+    file_stat->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
+    if ( (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+         && (handle->ffd.dwReserved0 & IO_REPARSE_TAG_SYMLINK)
+         // The SIS or DEDUP flag points to a MS deduplication feature of
+         // certain file storage products. It is not a normal symlink
+         // that should be ignored.
+         && (! (handle->ffd.dwReserved0 & IO_REPARSE_TAG_SIS))
+         && (! (handle->ffd.dwReserved0 & IO_REPARSE_TAG_DEDUP)) ) {
         file_stat->flags = CSYNC_VIO_FILE_FLAGS_SYMLINK;
         file_stat->type = CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK;
     } else if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_DEVICE

-- 
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