}
static uint32_t dos_mode_from_name(connection_struct *conn,
- const struct smb_filename *smb_fname)
+ const struct smb_filename *smb_fname,
+ uint32_t dosmode)
{
const char *p = NULL;
- uint32_t result = 0;
+ uint32_t result = dosmode;
- if (lp_hide_dot_files(SNUM(conn))) {
+ if (!(result & FILE_ATTRIBUTE_HIDDEN) &&
+ lp_hide_dot_files(SNUM(conn)))
+ {
p = strrchr_m(smb_fname->base_name, '/');
if (p) {
p++;
return 0;
}
- result |= dos_mode_from_name(conn, smb_fname);
-
/* Get the DOS attributes via the VFS if we can */
status = SMB_VFS_GET_DOS_ATTRIBUTES(conn, smb_fname, &result);
if (!NT_STATUS_IS_OK(status)) {
}
}
+ result |= dos_mode_from_name(conn, smb_fname, result);
+
/* Optimization : Only call is_hidden_path if it's not already
hidden. */
if (!(result & FILE_ATTRIBUTE_HIDDEN) &&