mirror of
https://github.com/reactos/reactos.git
synced 2025-07-05 00:21:22 +00:00
[NTFS] - After creating a new file, update creation disposition before calling NtfsCreateFile() recursively. This fixes creating a file via right-clicking in a folder.
svn path=/branches/GSoC_2016/NTFS/; revision=75423
This commit is contained in:
parent
935fcd1b35
commit
9cef425464
1 changed files with 12 additions and 2 deletions
|
@ -580,8 +580,18 @@ NtfsCreateFile(PDEVICE_OBJECT DeviceObject,
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we should be able to open the file
|
// Before we open the file we just created, we need to change the disposition (upper 8 bits of ULONG)
|
||||||
return NtfsCreateFile(DeviceObject, IrpContext);
|
// from create to open, since we already created the file
|
||||||
|
Stack->Parameters.Create.Options = (ULONG)FILE_OPEN << 24 | RequestedOptions;
|
||||||
|
|
||||||
|
// Now we should be able to open the file using NtfsCreateFile()
|
||||||
|
Status = NtfsCreateFile(DeviceObject, IrpContext);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
// We need to change Irp->IoStatus.Information to reflect creation
|
||||||
|
Irp->IoStatus.Information = FILE_CREATED;
|
||||||
|
}
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue