mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
tst: passthrough-dotnet: minor fix
This commit is contained in:
parent
ac7b7f4a1b
commit
e40505adb5
@ -259,13 +259,9 @@ namespace passthrough
|
|||||||
FileDesc FileDesc = (FileDesc)FileDesc0;
|
FileDesc FileDesc = (FileDesc)FileDesc0;
|
||||||
if (0 != (Flags & CleanupDelete))
|
if (0 != (Flags & CleanupDelete))
|
||||||
{
|
{
|
||||||
FileName = ConcatPath(FileName);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (null == FileDesc.Stream)
|
FileDesc.Info.Delete();
|
||||||
Directory.Delete(FileName);
|
|
||||||
else
|
|
||||||
FileDesc.Stream.Dispose();
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
@ -405,15 +401,11 @@ namespace passthrough
|
|||||||
String FileName)
|
String FileName)
|
||||||
{
|
{
|
||||||
FileDesc FileDesc = (FileDesc)FileDesc0;
|
FileDesc FileDesc = (FileDesc)FileDesc0;
|
||||||
FileName = ConcatPath(FileName);
|
|
||||||
/*
|
/*
|
||||||
* If a file has an open handle the Delete call below
|
* If a file has an open handle the Delete call below
|
||||||
* will only mark it for disposition.
|
* will only mark it for disposition.
|
||||||
*/
|
*/
|
||||||
if (null == FileDesc.Stream)
|
FileDesc.Info.Delete();
|
||||||
Directory.Delete(FileName);
|
|
||||||
else
|
|
||||||
File.Delete(FileName);
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
protected override Int32 Rename(
|
protected override Int32 Rename(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user