Skip to content

Commit ca9082b

Browse files
committed
Fix SFTP Symlinks
1. The symlink bits weren't getting checked as a if they were a pair of bits, so regular files looked like symlinks.
1 parent cea99e5 commit ca9082b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wolfsftp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2615,7 +2615,7 @@ static int SFTP_CreateLongName(WS_SFTPNAME* name)
26152615
if (tmp & FILEATRB_PER_DIR) {
26162616
perm[i++] = 'd';
26172617
}
2618-
else if (tmp & FILEATRB_PER_LINK) {
2618+
else if ((tmp & FILEATRB_PER_LINK) == FILEATRB_PER_LINK) {
26192619
perm[i++] = 'l';
26202620
}
26212621
else {

0 commit comments

Comments
 (0)