Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions impacket/smb3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,13 +1261,13 @@ def create(self, treeId, fileName, desiredAccess, shareMode, creationOptions, cr
# Is this file NOT on the root directory?
if len(fileName.split('\\')) > 2:
parentDir = ntpath.dirname(pathName)
if parentDir in self.GlobalFileTable:
raise Exception("Don't know what to do now! :-o")
else:
parentEntry = copy.deepcopy(FILE)
parentEntry['LeaseKey'] = uuid.generate()
parentEntry['LeaseState'] = SMB2_LEASE_NONE
self.GlobalFileTable[parentDir] = parentEntry
if parentDir in self.GlobalFileTable:
raise Exception("Don't know what to do now! :-o")
else:
parentEntry = copy.deepcopy(FILE)
parentEntry['LeaseKey'] = uuid.generate()
parentEntry['LeaseState'] = SMB2_LEASE_NONE
self.GlobalFileTable[parentDir] = parentEntry

packet = self.SMB_PACKET()
packet['Command'] = SMB2_CREATE
Expand Down