Skip to content

Commit

Permalink
Zephyr File Permissions
Browse files Browse the repository at this point in the history
When populating the file permission status for a file vs directory in
the zephyr porting, use the new constants for the file permissions being
a regular file or directory. Not (the wrong) bare numbers.
  • Loading branch information
ejohnstown committed Dec 6, 2023
1 parent f35cab9 commit 59e7b37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wolfsftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4729,9 +4729,9 @@ static int PopulateAttributes(WS_SFTP_FILEATRB* atr, WSTAT_T* stats)
atr->per = 0755;
/* Mimic S_IFMT */
if (stats->type == FS_DIR_ENTRY_FILE)
atr->per |= 0040000;
atr->per |= FILEATRB_PER_FILE;
else if (stats->type == FS_DIR_ENTRY_DIR)
atr->per |= 0100000;
atr->per |= FILEATRB_PER_DIR;
else
return WS_BAD_FILE_E;

Expand Down

0 comments on commit 59e7b37

Please sign in to comment.