Skip to content

Commit

Permalink
Kernel - Remove UNCName CaseInSensitive prefix during Create
Browse files Browse the repository at this point in the history
  • Loading branch information
Liryna committed May 13, 2022
1 parent 622933b commit e9f4bef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/create.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,8 @@ Return Value:
if (RequestContext->Dcb->UNCName != NULL) {
UNICODE_STRING fileNameUS =
DokanWrapUnicodeString(fileName, fileNameLength);
if (StartsWith(&fileNameUS, RequestContext->Dcb->UNCName)) {
if (RtlPrefixUnicodeString(RequestContext->Dcb->UNCName, &fileNameUS,
/*CaseInSensitive=*/TRUE)) {
fileNameLength -= RequestContext->Dcb->UNCName->Length;
if (fileNameLength == 0) {
fileName[0] = '\\';
Expand Down

0 comments on commit e9f4bef

Please sign in to comment.