mirror of https://github.com/wolfSSL/wolfssh.git
Fix SFTP Symlinks
1. When making a longname, mask the permission file type bits and check it being a link. 2. Mask the permission bits the same way for checking the item being a directory.pull/791/head
parent
cea99e5e83
commit
3386b636cf
|
@ -2612,10 +2612,10 @@ static int SFTP_CreateLongName(WS_SFTPNAME* name)
|
|||
word32 tmp = atr->per;
|
||||
|
||||
i = 0;
|
||||
if (tmp & FILEATRB_PER_DIR) {
|
||||
if ((tmp & FILEATRB_PER_MASK_TYPE) == FILEATRB_PER_DIR) {
|
||||
perm[i++] = 'd';
|
||||
}
|
||||
else if (tmp & FILEATRB_PER_LINK) {
|
||||
else if ((tmp & FILEATRB_PER_MASK_TYPE) == FILEATRB_PER_LINK) {
|
||||
perm[i++] = 'l';
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue