diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/dosmode.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index a376cbc0f38..c80d2405ed6 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -636,12 +636,10 @@ uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname) result |= dos_mode_from_name(conn, smb_fname, result); - if (result == 0) { - if (S_ISDIR(smb_fname->st.st_ex_mode)) { - result = FILE_ATTRIBUTE_DIRECTORY; - } else { - result = FILE_ATTRIBUTE_NORMAL; - } + if (S_ISDIR(smb_fname->st.st_ex_mode)) { + result |= FILE_ATTRIBUTE_DIRECTORY; + } else if (result == 0) { + result = FILE_ATTRIBUTE_NORMAL; } result = filter_mode_by_protocol(result); |