diff options
author | Jeremy Allison <jra@samba.org> | 2007-01-16 20:32:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:12 -0500 |
commit | 6d16226a2d449ab7731bc686a742a2b31ccf41ae (patch) | |
tree | 4f9c6a2fa4ea7ecbe5692d9cbc0eb5f14fb6ca43 | |
parent | 203622b7340b6e3309ce73f0d51ea9712cb09768 (diff) | |
download | samba-6d16226a2d449ab7731bc686a742a2b31ccf41ae.tar.gz samba-6d16226a2d449ab7731bc686a742a2b31ccf41ae.tar.bz2 samba-6d16226a2d449ab7731bc686a742a2b31ccf41ae.zip |
r20840: Keep removing the old BOOL ok logic.
Jeremy.
(This used to be commit 224ff059915b2c92ec86d2c3c4b10c3bc552ffa2)
-rw-r--r-- | source3/smbd/reply.c | 14 |
1 files changed, 9 insertions, 5 deletions
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; |