Skip to content

Commit

Permalink
Merge pull request #7609 from nextcloud/bugfix/handleWindowsDirectory…
Browse files Browse the repository at this point in the history
…Junction

Bugfix/handle windows directory junction
  • Loading branch information
mgallien authored Dec 9, 2024
2 parents d8f1df9 + 2ae4d56 commit f240cd9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/csync/vio/csync_vio_local_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f240cd9

Please sign in to comment.