From: Jeremy Allison Date: Sat, 19 Mar 2016 05:10:34 +0000 (-0700) Subject: s3: vfs: recycle. Remove use of vfs_stat_smb_basename(). X-Git-Tag: tdb-1.3.9~123 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9dc02266c799d87f1dba7147f41b6946e0ba4c0;p=thirdparty%2Fsamba.git 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 --- 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; } }