while ((name = ReadDirName(dptr->dir_hnd, poffset, pst, &talloced))
!= NULL) {
if (is_visible_file(dptr->conn,
- dptr->smb_dname,
+ dptr->dir_hnd,
name,
pst,
true)) {
/* First check if it should be visible. */
if (!is_visible_file(dptr->conn,
- dptr->smb_dname,
+ dptr->dir_hnd,
dptr->wcard,
pst,
true)) {
********************************************************************/
bool is_visible_file(connection_struct *conn,
- struct smb_filename *dir_path,
+ struct smb_Dir *dir_hnd,
const char *name,
SMB_STRUCT_STAT *pst,
bool use_veto)
bool hide_special = lp_hide_special_files(SNUM(conn));
int hide_new_files_timeout = lp_hide_new_files_timeout(SNUM(conn));
char *entry = NULL;
+ struct smb_filename *dir_path = dir_hnd->fsp->fsp_name;
struct smb_filename *smb_fname_base = NULL;
bool ret = false;
goto out;
}
/* Honour _hide unwriteable_ option */
- if (hide_unwriteable && !user_can_write_file(conn,
- smb_fname_base)) {
+ if (hide_unwriteable &&
+ !user_can_write_file(conn,
+ smb_fname_base))
+ {
DEBUG(10,("is_visible_file: file %s is unwritable.\n",
entry ));
ret = false;
}
if (!is_visible_file(conn,
- fsp->fsp_name,
+ dir_hnd,
dname,
&st,
True)) {