From f9dc02266c799d87f1dba7147f41b6946e0ba4c0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Mar 2016 22:10:34 -0700 Subject: [PATCH] s3: vfs: recycle. Remove use of vfs_stat_smb_basename(). We only need a basic STAT here. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni --- source3/modules/vfs_recycle.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index ca3fc2ee5f4..dfc3b9cc0f3 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -186,10 +186,12 @@ static mode_t recycle_subdir_mode(vfs_handle_struct *handle) static bool recycle_directory_exist(vfs_handle_struct *handle, const char *dname) { - SMB_STRUCT_STAT st; + struct smb_filename smb_fname = { + .base_name = discard_const_p(char, dname) + }; - if (vfs_stat_smb_basename(handle->conn, dname, &st) == 0) { - if (S_ISDIR(st.st_ex_mode)) { + if (SMB_VFS_STAT(handle->conn, &smb_fname) == 0) { + if (S_ISDIR(smb_fname.st.st_ex_mode)) { return True; } } -- 2.47.3