mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 14:36:01 +03:00
Merge pull request #4748 from owncloud/win_stat_revisited
vio for windows: Use more graceful create file params.
This commit is contained in:
commit
6814342d1f
1 changed files with 4 additions and 2 deletions
|
@ -230,8 +230,10 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
|
||||||
ULARGE_INTEGER FileIndex;
|
ULARGE_INTEGER FileIndex;
|
||||||
mbchar_t *wuri = c_utf8_path_to_locale( uri );
|
mbchar_t *wuri = c_utf8_path_to_locale( uri );
|
||||||
|
|
||||||
h = CreateFileW( wuri, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING,
|
h = CreateFileW( wuri, 0, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE,
|
||||||
FILE_ATTRIBUTE_NORMAL+FILE_FLAG_BACKUP_SEMANTICS+FILE_FLAG_OPEN_REPARSE_POINT, NULL );
|
NULL, OPEN_EXISTING,
|
||||||
|
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
|
||||||
|
NULL );
|
||||||
if( h == INVALID_HANDLE_VALUE ) {
|
if( h == INVALID_HANDLE_VALUE ) {
|
||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_CRIT, "CreateFileW failed on %s", uri );
|
CSYNC_LOG(CSYNC_LOG_PRIORITY_CRIT, "CreateFileW failed on %s", uri );
|
||||||
errno = GetLastError();
|
errno = GetLastError();
|
||||||
|
|
Loading…
Reference in a new issue