mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
tst: winfsp-tests: add --share-prefix option:
- this accommodates network file systems that have mapped drives
This commit is contained in:
parent
178200fd63
commit
d1bb65a998
@ -295,6 +295,20 @@ int main(int argc, char *argv[])
|
|||||||
WinFspNetTests = 0;
|
WinFspNetTests = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (0 == strncmp("--share-prefix=", a, sizeof "--share-prefix=" - 1))
|
||||||
|
{
|
||||||
|
/* hack to allow name queries on network file systems with mapped drives */
|
||||||
|
|
||||||
|
WCHAR SharePrefixBuf[MAX_PATH];
|
||||||
|
|
||||||
|
if (0 != MultiByteToWideChar(CP_UTF8, 0,
|
||||||
|
a + sizeof "--share-prefix=" - 1, -1, SharePrefixBuf, MAX_PATH))
|
||||||
|
{
|
||||||
|
rmarg(argv, argc, argi);
|
||||||
|
|
||||||
|
OptSharePrefixLength = (ULONG)(wcslen(SharePrefixBuf) * sizeof(WCHAR));
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (0 == strcmp("--no-traverse", a))
|
else if (0 == strcmp("--no-traverse", a))
|
||||||
{
|
{
|
||||||
if (LookupPrivilegeValueW(0, SE_CHANGE_NOTIFY_NAME, &OptNoTraverseLuid) &&
|
if (LookupPrivilegeValueW(0, SE_CHANGE_NOTIFY_NAME, &OptNoTraverseLuid) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user