mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 05:40:14 -05:00
Reduces the permission to stat files in Windows.
Check explicitely to have read permission in scanning.
This commit is contained in:
parent
5a2e118c38
commit
64f4d59adb
4 changed files with 13 additions and 4 deletions
|
|
@ -203,7 +203,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, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
|
||||
h = CreateFile(file, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 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