if not a directory then set file type with windows

pull/653/head
JacobBarthelmeh 2024-02-02 10:11:33 -07:00
parent 8ce9d164ca
commit 23e8405c43
1 changed files with 2 additions and 1 deletions

View File

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