We don't need that else branch, this could be a switch as well
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
if ((st->st_ex_mode & S_IWUSR) == 0) {
result |= FILE_ATTRIBUTE_READONLY;
}
- } else if (ro_opts == MAP_READONLY_PERMISSIONS) {
+ }
+ if (ro_opts == MAP_READONLY_PERMISSIONS) {
/* smb_fname->fsp can be NULL for an MS-DFS link. */
/* Check actual permissions for read-only. */
if ((fsp != NULL) && !can_write_to_fsp(fsp)) {
result |= FILE_ATTRIBUTE_READONLY;
}
- } /* Else never set the readonly bit. */
+ }
if (MAP_ARCHIVE(conn) && ((st->st_ex_mode & S_IXUSR) != 0)) {
result |= FILE_ATTRIBUTE_ARCHIVE;