Merge pull request #7609 from nextcloud/bugfix/handleWindowsDirectoryJunction

Bugfix/handle windows directory junction
This commit is contained in:
Matthieu Gallien 2024-12-09 11:15:22 +01:00 committed by GitHub
commit f240cd951f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,7 +161,13 @@ std::unique_ptr<csync_file_stat_t> csync_vio_local_readdir(csync_vio_handle_t *h
!isDirectory) {
file_stat->type = ItemTypeSkip;
} else if (isDirectory) {
file_stat->type = ItemTypeDirectory;
if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT &&
(handle->ffd.dwReserved0 == IO_REPARSE_TAG_SYMLINK ||
handle->ffd.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT)) {
file_stat->type = ItemTypeSoftLink;
} else {
file_stat->type = ItemTypeDirectory;
}
} else {
file_stat->type = ItemTypeFile;
}