diff --git a/impacket/smbserver.py b/impacket/smbserver.py index 605a2b463..968cb9196 100644 --- a/impacket/smbserver.py +++ b/impacket/smbserver.py @@ -1771,7 +1771,7 @@ def smbComDeleteDirectory(connId, smbServer, SMBCommand, recvPacket): smbServer.log("Path not in current working directory", logging.ERROR) errorCode = STATUS_OBJECT_PATH_SYNTAX_BAD - if os.path.exists(pathName) is not True: + elif not os.path.exists(pathName): errorCode = STATUS_NO_SUCH_FILE else: