summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index f633be3740..c90c59698f 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4755,7 +4755,6 @@ int reply_setdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
{
int snum;
int outsize = 0;
- BOOL ok = False;
pstring newdir;
NTSTATUS status;
@@ -4775,17 +4774,12 @@ int reply_setdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
RESOLVE_DFSPATH(newdir, conn, inbuf, outbuf);
- if (strlen(newdir) == 0) {
- ok = True;
- } else {
- ok = vfs_directory_exist(conn,newdir,NULL);
- if (ok)
- set_conn_connectpath(conn,newdir);
- }
-
- if (!ok) {
- END_PROFILE(pathworks_setdir);
- return ERROR_DOS(ERRDOS,ERRbadpath);
+ if (strlen(newdir) != 0) {
+ if (!vfs_directory_exist(conn,newdir,NULL)) {
+ END_PROFILE(pathworks_setdir);
+ return ERROR_DOS(ERRDOS,ERRbadpath);
+ }
+ set_conn_connectpath(conn,newdir);
}
outsize = set_message(outbuf,0,0,False);