From 9b56b3a42093fb2d8a2e27e131bb4d80e676a99e Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Sun, 12 Jun 2016 23:27:28 -0700 Subject: [PATCH] dll: fuse: testing --- src/dll/fuse/fuse_intf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dll/fuse/fuse_intf.c b/src/dll/fuse/fuse_intf.c index f508cd13..fdb16f7b 100644 --- a/src/dll/fuse/fuse_intf.c +++ b/src/dll/fuse/fuse_intf.c @@ -24,7 +24,8 @@ NTSTATUS fsp_fuse_op_enter(FSP_FILE_SYSTEM *FileSystem, struct fsp_fuse_context_header *contexthdr; char *PosixPath = 0; UINT32 Uid = -1, Gid = -1; - PWSTR FileName = 0; + PWSTR FileName = 0, Suffix; + WCHAR Root[2] = L"\\"; HANDLE Token = 0; union { @@ -43,7 +44,10 @@ NTSTATUS fsp_fuse_op_enter(FSP_FILE_SYSTEM *FileSystem, if (FspFsctlTransactCreateKind == Request->Kind) { - FileName = (PWSTR)Request->Buffer; + if (Request->Req.Create.OpenTargetDirectory) + FspPathSuffix((PWSTR)Request->Buffer, &FileName, &Suffix, Root); + else + FileName = (PWSTR)Request->Buffer; Token = (HANDLE)Request->Req.Create.AccessToken; } else if (FspFsctlTransactSetInformationKind == Request->Kind && @@ -58,6 +62,8 @@ NTSTATUS fsp_fuse_op_enter(FSP_FILE_SYSTEM *FileSystem, if (0 != FileName) { Result = FspPosixMapWindowsToPosixPath(FileName, &PosixPath); + if (FspFsctlTransactCreateKind == Request->Kind && Request->Req.Create.OpenTargetDirectory) + FspPathCombine((PWSTR)Request->Buffer, Suffix); if (!NT_SUCCESS(Result)) goto exit; }