mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 02:37:49 +02:00
NTFileSystemAdapter: Bugfix: FILE_DELETE_ON_CLOSE was ignored in some cases
This commit is contained in:
parent
ef6551aaca
commit
4ade942074
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,6 @@ namespace SMBLibrary
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
deleteOnClose = (createOptions & CreateOptions.FILE_DELETE_ON_CLOSE) > 0;
|
|
||||||
NTStatus openStatus = OpenFileStream(out stream, path, fileAccess, shareAccess, createOptions);
|
NTStatus openStatus = OpenFileStream(out stream, path, fileAccess, shareAccess, createOptions);
|
||||||
if (openStatus != NTStatus.STATUS_SUCCESS)
|
if (openStatus != NTStatus.STATUS_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -238,6 +237,7 @@ namespace SMBLibrary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteOnClose = (createOptions & CreateOptions.FILE_DELETE_ON_CLOSE) > 0;
|
||||||
handle = new FileHandle(path, entry.IsDirectory, stream, deleteOnClose);
|
handle = new FileHandle(path, entry.IsDirectory, stream, deleteOnClose);
|
||||||
if (fileStatus != FileStatus.FILE_CREATED &&
|
if (fileStatus != FileStatus.FILE_CREATED &&
|
||||||
fileStatus != FileStatus.FILE_OVERWRITTEN &&
|
fileStatus != FileStatus.FILE_OVERWRITTEN &&
|
||||||
|
|
Loading…
Add table
Reference in a new issue