Merge pull request #244 from JacobBarthelmeh/sftp

add directory attribute to Windows build
pull/248/head
John Safranek 2020-02-27 19:07:38 -08:00 committed by GitHub
commit abf126206a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -3758,6 +3758,7 @@ int SFTP_GetAttributes(void* fs, const char* fileName, WS_SFTP_FILEATRB* atr,
atr->flags |= WOLFSSH_FILEATRB_PERM;
atr->per = 0555 |
(stats.dwFileAttributes | FILE_ATTRIBUTE_READONLY ? 0 : 0200);
atr->per |= (stats.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? 0x4000:0;
#if 0
/* @TODO handle the constellation of possible Windows FILETIMEs */