From 6d16226a2d449ab7731bc686a742a2b31ccf41ae Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Jan 2007 20:32:39 +0000 Subject: r20840: Keep removing the old BOOL ok logic. Jeremy. (This used to be commit 224ff059915b2c92ec86d2c3c4b10c3bc552ffa2) --- source3/smbd/reply.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source3/smbd/reply.c') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 3a1514f1aa..d48c081e21 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3677,11 +3677,15 @@ static BOOL recursive_rmdir(connection_struct *conn, char *directory) BOOL rmdir_internals(connection_struct *conn, const char *directory) { - BOOL ok; + int ret; SMB_STRUCT_STAT st; - ok = (SMB_VFS_RMDIR(conn,directory) == 0); - if(!ok && ((errno == ENOTEMPTY)||(errno == EEXIST)) && lp_veto_files(SNUM(conn))) { + ret = SMB_VFS_RMDIR(conn,directory); + if (ret == 0) { + return True; + } + + if(((errno == ENOTEMPTY)||(errno == EEXIST)) && lp_veto_files(SNUM(conn))) { /* * Check to see if the only thing in this directory are * vetoed files/directories. If so then delete them and @@ -3744,12 +3748,12 @@ BOOL rmdir_internals(connection_struct *conn, const char *directory) } CloseDir(dir_hnd); /* Retry the rmdir */ - ok = (SMB_VFS_RMDIR(conn,directory) == 0); + ret = SMB_VFS_RMDIR(conn,directory); } err: - if (!ok) { + if (ret != 0) { DEBUG(3,("rmdir_internals: couldn't remove directory %s : " "%s\n", directory,strerror(errno))); return False; -- cgit