mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
win32: Read inode values even though file is open
According to MSDN, CreateFile can be passed 0 if only stat-like info is required. This allows to upload locked files.
This commit is contained in:
parent
4489eb6cc0
commit
d22eb0ceef
@ -356,7 +356,7 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
|
||||
buf->inode = sb.st_ino;
|
||||
#ifdef _WIN32
|
||||
/* Get the Windows file id as an inode replacement. */
|
||||
HANDLE h = CreateFileW( wuri, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
|
||||
HANDLE h = CreateFileW( wuri, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL+FILE_FLAG_BACKUP_SEMANTICS, NULL );
|
||||
if( h == INVALID_HANDLE_VALUE ) {
|
||||
errno = GetLastError();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user