From b950a91fb2a62c5429bbeb60679dfbd695fd6732 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Aug 2006 06:06:02 +0000 Subject: r17656: some systems (like older solaris) don't return ENOTEMPTY on rmdir() with non-empty directory (This used to be commit 1775381afad8a97777a45b6e98802dda8b389ecb) --- source4/ntvfs/posix/pvfs_mkdir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source4/ntvfs/posix/pvfs_mkdir.c b/source4/ntvfs/posix/pvfs_mkdir.c index 338fc7df0b..2f5ba0a744 100644 --- a/source4/ntvfs/posix/pvfs_mkdir.c +++ b/source4/ntvfs/posix/pvfs_mkdir.c @@ -179,6 +179,10 @@ NTSTATUS pvfs_rmdir(struct ntvfs_module_context *ntvfs, } if (rmdir(name->full_name) == -1) { + /* some olders systems don't return ENOTEMPTY to rmdir() */ + if (errno == EEXIST) { + return NT_STATUS_DIRECTORY_NOT_EMPTY; + } return pvfs_map_errno(pvfs, errno); } -- cgit