mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 08:54:40 +00:00
[RDBSS]
Implement RxSetDispositionInfo(): this allows deleting files on a remote NFS share! CORE-8204 CORE-11327 CORE-13636 svn path=/trunk/; revision=75482
This commit is contained in:
parent
6afca05215
commit
29a235cb9b
|
@ -8605,12 +8605,47 @@ RxSetBasicInfo(
|
|||
return Status;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS
|
||||
RxSetDispositionInfo(
|
||||
PRX_CONTEXT RxContext)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
NTSTATUS Status;
|
||||
|
||||
PAGED_CODE();
|
||||
|
||||
/* First, make the mini-rdr work! */
|
||||
Status = RxpSetInfoMiniRdr(RxContext, FileDispositionInformation);
|
||||
/* If it succeed, we'll keep track of the change */
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
PFCB Fcb;
|
||||
PFILE_OBJECT FileObject;
|
||||
PFILE_DISPOSITION_INFORMATION FileDispo;
|
||||
|
||||
Fcb = (PFCB)RxContext->pFcb;
|
||||
FileObject = RxContext->CurrentIrpSp->FileObject;
|
||||
FileDispo = RxContext->CurrentIrp->AssociatedIrp.SystemBuffer;
|
||||
/* Caller asks for deletion: mark as delete on close */
|
||||
if (FileDispo->DeleteFile)
|
||||
{
|
||||
SetFlag(Fcb->FcbState, FCB_STATE_DELETE_ON_CLOSE);
|
||||
FileObject->DeletePending = TRUE;
|
||||
}
|
||||
/* Otherwise, clear it */
|
||||
else
|
||||
{
|
||||
ClearFlag(Fcb->FcbState, FCB_STATE_DELETE_ON_CLOSE);
|
||||
FileObject->DeletePending = FALSE;
|
||||
}
|
||||
|
||||
/* Sanitize output */
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
|
|
Loading…
Reference in a new issue