diff options
Diffstat (limited to 'source3/modules/vfs_streams_depot.c')
-rw-r--r-- | source3/modules/vfs_streams_depot.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index f33d998b4e0..3ada92eeb5e 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -665,7 +665,6 @@ static int streams_depot_unlink(vfs_handle_struct *handle, static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path) { struct smb_filename *smb_fname_base = NULL; - char *dirname; int ret = -1; DEBUG(10, ("streams_depot_rmdir called for %s\n", path)); @@ -691,14 +690,15 @@ static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path) return -1; } - dirname = stream_dir(handle, - smb_fname_base, - &smb_fname_base->st, - false); - if (dirname != NULL) { - SMB_VFS_NEXT_RMDIR(handle, dirname); + if (smb_fname_base->st.st_ex_nlink == 2) { + char *dirname = stream_dir(handle, smb_fname_base, + &smb_fname_base->st, false); + + if (dirname != NULL) { + SMB_VFS_NEXT_RMDIR(handle, dirname); + } + TALLOC_FREE(dirname); } - TALLOC_FREE(dirname); ret = SMB_VFS_NEXT_RMDIR(handle, path); |