s3: vfs: recycle. Remove use of vfs_stat_smb_basename().
authorJeremy Allison <jra@samba.org>
Sat, 19 Mar 2016 05:10:34 +0000 (22:10 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 24 Mar 2016 21:57:17 +0000 (22:57 +0100)
We only need a basic STAT here.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/modules/vfs_recycle.c

index ca3fc2e..dfc3b9c 100644 (file)
@@ -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;
                }
        }