From 9aeabb5068dc1ba50e7dfeaf3e8b3ea53c2a4192 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Thu, 20 Feb 2020 14:34:52 -0700 Subject: [PATCH] add directory attribute to Windows build --- src/wolfsftp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wolfsftp.c b/src/wolfsftp.c index 9480c37..c66a067 100644 --- a/src/wolfsftp.c +++ b/src/wolfsftp.c @@ -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 */