diff options
author | Jeremy Allison <jra@samba.org> | 2007-01-16 20:32:39 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-01-16 20:32:39 +0000 |
commit | 8f3b1cc0a55b151574a41cec73250f6fc75a0164 (patch) | |
tree | 5873bbd938c218b798af15fa7d170c3788dbd062 /source/smbd/reply.c | |
parent | 363718bb752602317dfda7b9648b044c3238249b (diff) | |
download | samba-8f3b1cc0a55b151574a41cec73250f6fc75a0164.tar.gz samba-8f3b1cc0a55b151574a41cec73250f6fc75a0164.tar.xz samba-8f3b1cc0a55b151574a41cec73250f6fc75a0164.zip |
r20840: Keep removing the old BOOL ok logic.
Jeremy.
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 3a1514f1aa4..d48c081e217 100644 --- a/source/smbd/reply.c +++ b/source/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; |