Skip to content

Commit

Permalink
win32 vio: Add the OPEN_REPARSE_POINTS flag to the CreateFileW call.
Browse files Browse the repository at this point in the history
Otherwise win32 api simply does not open reparse points at all,
such as junctions.

This will improve the user experience of owncloud#3813 as we now identify
the junctions as symlinks.... and ignore them properly.
  • Loading branch information
Klaas Freitag committed Sep 25, 2015
1 parent 57f10c0 commit e7e0e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csync/src/vio/csync_vio_local_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
mbchar_t *wuri = c_utf8_path_to_locale( uri );

h = CreateFileW( wuri, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL+FILE_FLAG_BACKUP_SEMANTICS, NULL );
FILE_ATTRIBUTE_NORMAL+FILE_FLAG_BACKUP_SEMANTICS+FILE_FLAG_OPEN_REPARSE_POINT, NULL );
if( h == INVALID_HANDLE_VALUE ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_CRIT, "CreateFileW failed on %s", uri );
errno = GetLastError();
Expand Down

0 comments on commit e7e0e5b

Please sign in to comment.