Browse Source

SMB1FileStoreHelper: Delete / Rename: Bugfix: The temporary file handle was not closed

Tal Aloni 7 years ago
parent
commit
ea4f524d89
1 changed files with 0 additions and 8 deletions
  1. 0 8
      SMBLibrary/Server/SMB1/SMB1FileStoreHelper.cs

+ 0 - 8
SMBLibrary/Server/SMB1/SMB1FileStoreHelper.cs

@@ -49,10 +49,6 @@ namespace SMBLibrary.Server.SMB1
             FileDispositionInformation fileDispositionInfo = new FileDispositionInformation();
             fileDispositionInfo.DeletePending = true;
             status = fileStore.SetFileInformation(handle, fileDispositionInfo);
-            if (status != NTStatus.STATUS_SUCCESS)
-            {
-                return status;
-            }
             fileStore.CloseFile(handle);
             return status;
         }
@@ -77,10 +73,6 @@ namespace SMBLibrary.Server.SMB1
             renameInfo.ReplaceIfExists = false;
             renameInfo.FileName = newName;
             status = fileStore.SetFileInformation(handle, renameInfo);
-            if (status != NTStatus.STATUS_SUCCESS)
-            {
-                return status;
-            }
             fileStore.CloseFile(handle);
             return status;
         }