mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
sys: notify implementation
This commit is contained in:
parent
92b7989999
commit
6b4b1dff6c
@ -1218,6 +1218,9 @@ static VOID FspVolumeNotifyWork(PVOID NotifyWorkItem0)
|
|||||||
FileName.Length =
|
FileName.Length =
|
||||||
FileName.MaximumLength = (USHORT)(NotifyInfoSize - sizeof(FSP_FSCTL_NOTIFY_INFO));
|
FileName.MaximumLength = (USHORT)(NotifyInfoSize - sizeof(FSP_FSCTL_NOTIFY_INFO));
|
||||||
FileName.Buffer = NotifyInfo->FileNameBuf;
|
FileName.Buffer = NotifyInfo->FileNameBuf;
|
||||||
|
if (sizeof(WCHAR) * 2/* not empty or root */ <= FileName.Length &&
|
||||||
|
L'\\' == FileName.Buffer[FileName.Length / sizeof(WCHAR) - 1])
|
||||||
|
FileName.Length -= sizeof(WCHAR);
|
||||||
|
|
||||||
if (!FspFileNameIsValid(&FileName, FsvolDeviceExtension->VolumeParams.MaxComponentLength,
|
if (!FspFileNameIsValid(&FileName, FsvolDeviceExtension->VolumeParams.MaxComponentLength,
|
||||||
FsvolDeviceExtension->VolumeParams.NamedStreams ? &StreamPart : 0,
|
FsvolDeviceExtension->VolumeParams.NamedStreams ? &StreamPart : 0,
|
||||||
@ -1249,8 +1252,7 @@ static VOID FspVolumeNotifyWork(PVOID NotifyWorkItem0)
|
|||||||
Result = RtlAppendUnicodeStringToString(&FullFileName, &AbsFileName);
|
Result = RtlAppendUnicodeStringToString(&FullFileName, &AbsFileName);
|
||||||
if (NT_SUCCESS(Result))
|
if (NT_SUCCESS(Result))
|
||||||
{
|
{
|
||||||
if (sizeof(WCHAR) * 2/* not empty or root */ <= AbsFileName.Length &&
|
if (sizeof(WCHAR) * 2/* not empty or root */ <= AbsFileName.Length)
|
||||||
L'\\' != AbsFileName.Buffer[AbsFileName.Length / sizeof(WCHAR) - 1])
|
|
||||||
Result = RtlAppendUnicodeToString(&FullFileName, L"\\");
|
Result = RtlAppendUnicodeToString(&FullFileName, L"\\");
|
||||||
}
|
}
|
||||||
if (NT_SUCCESS(Result))
|
if (NT_SUCCESS(Result))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user