浏览代码

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

Tal Aloni 7 年之前
父节点
当前提交
ea4f524d89
共有 1 个文件被更改,包括 0 次插入8 次删除
  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;
         }