[Pkg-owncloud-commits] [owncloud-client] 85/121: Windows: Skip symlinks and junctions again #5019 (#5036)
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Jul 28 15:32:01 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 11b44358f6c8bde15daf7d1aa15b04e5200153b7
Author: ckamm <mail at ckamm.de>
Date: Thu Jul 7 08:07:19 2016 +0200
Windows: Skip symlinks and junctions again #5019 (#5036)
Fixes an accidental behavior change introduced in
055c2ef73f84b68ebfbe0296fadef438981cba37
Affects #4056 and owncloud/enterprise#1225.
---
csync/src/vio/csync_vio_local_win.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/csync/src/vio/csync_vio_local_win.c b/csync/src/vio/csync_vio_local_win.c
index f842a61..b50d0ec 100644
--- a/csync/src/vio/csync_vio_local_win.c
+++ b/csync/src/vio/csync_vio_local_win.c
@@ -167,16 +167,20 @@ 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->flags = CSYNC_VIO_FILE_FLAGS_NONE;
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;
+ if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
+ // Detect symlinks, and treat junctions as symlinks too.
+ if (handle->ffd.dwReserved0 == IO_REPARSE_TAG_SYMLINK
+ || handle->ffd.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT) {
+ file_stat->flags |= CSYNC_VIO_FILE_FLAGS_SYMLINK;
+ file_stat->type = CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK;
+ } else {
+ // The SIS and DEDUP reparse points should be treated as
+ // regular files. We don't know about the other ones yet,
+ // but will also treat them normally for now.
+ file_stat->type = CSYNC_VIO_FILE_TYPE_REGULAR;
+ }
} else if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_DEVICE
|| handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_OFFLINE
|| handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_TEMPORARY) {
@@ -187,7 +191,6 @@ csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
file_stat->type = CSYNC_VIO_FILE_TYPE_REGULAR;
}
- file_stat->flags = CSYNC_VIO_FILE_FLAGS_NONE;
/* Check for the hidden flag */
if( handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN ) {
file_stat->flags |= CSYNC_VIO_FILE_FLAGS_HIDDEN;
--
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