mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Fixes the stat operation of a directory in Windows
This commit is contained in:
parent
cc968a94ec
commit
5113baa175
1 changed files with 2 additions and 1 deletions
|
|
@ -122,6 +122,7 @@
|
|||
#define HAVE_FSYNC 1
|
||||
#define fsync _commit
|
||||
#define rename windows_rename
|
||||
#define mkdir(a, b) mkdir(a)
|
||||
|
||||
/**
|
||||
* Generic stat information.
|
||||
|
|
@ -194,7 +195,7 @@ static inline int windows_stat(const char* file, struct windows_stat* st)
|
|||
BY_HANDLE_FILE_INFORMATION info;
|
||||
HANDLE h;
|
||||
|
||||
h = CreateFile(file, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0);
|
||||
h = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
DWORD error = GetLastError();
|
||||
switch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue