1
0
mirror of https://github.com/winfsp/winfsp.git synced 2025-12-25 21:42:55 -06:00

sys: FspUnicodePathIsValid: check and return stream type

This commit is contained in:
Bill Zissimopoulos
2016-10-05 13:44:32 -07:00
parent 4ccbd1bdf6
commit c6967c737a
5 changed files with 61 additions and 14 deletions

View File

@@ -1114,7 +1114,7 @@ static NTSTATUS FspFsvolSetRenameInformation(
if (FileNode->IsRootDirectory)
/* cannot rename root directory */
return STATUS_INVALID_PARAMETER;
if (!FspUnicodePathIsValid(&FileNode->FileName, 0))
if (!FspUnicodePathIsValid(&FileNode->FileName, 0, 0))
/* cannot rename streams (WinFsp limitation) */
return STATUS_INVALID_PARAMETER;
@@ -1139,7 +1139,7 @@ static NTSTATUS FspFsvolSetRenameInformation(
if (L'\\' == Suffix.Buffer[0])
FspUnicodePathSuffix(&Suffix, &NewFileName, &Suffix);
if (!FspUnicodePathIsValid(&Remain, 0) || !FspUnicodePathIsValid(&Suffix, 0))
if (!FspUnicodePathIsValid(&Remain, 0, 0) || !FspUnicodePathIsValid(&Suffix, 0, 0))
{
/* cannot rename streams (WinFsp limitation) */
Result = STATUS_INVALID_PARAMETER;