mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
Merge branch 'pvt-fuse-mountmgr'
This commit is contained in:
commit
84b3f98d38
@ -180,7 +180,7 @@ FSP_FUSE_API struct fuse_chan *fsp_fuse_mount(struct fsp_fuse_env *env,
|
|||||||
const char *mountpoint, struct fuse_args *args)
|
const char *mountpoint, struct fuse_args *args)
|
||||||
{
|
{
|
||||||
struct fuse_chan *ch = 0;
|
struct fuse_chan *ch = 0;
|
||||||
WCHAR TempMountPointBuf[MAX_PATH], MountPointBuf[MAX_PATH];
|
WCHAR TempMountPointBuf[MAX_PATH], MountPointBuf[MAX_PATH + 4];
|
||||||
int Size;
|
int Size;
|
||||||
|
|
||||||
if (0 == mountpoint || '\0' == mountpoint[0] ||
|
if (0 == mountpoint || '\0' == mountpoint[0] ||
|
||||||
@ -212,6 +212,33 @@ FSP_FUSE_API struct fuse_chan *fsp_fuse_mount(struct fsp_fuse_env *env,
|
|||||||
MountPointBuf[6] = '\0';
|
MountPointBuf[6] = '\0';
|
||||||
Size = 7 * sizeof(WCHAR);
|
Size = 7 * sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
|
else if (
|
||||||
|
(
|
||||||
|
'\\' == mountpoint[0] &&
|
||||||
|
'\\' == mountpoint[1] &&
|
||||||
|
('?' == mountpoint[2] || '.' == mountpoint[2]) &&
|
||||||
|
'\\' == mountpoint[3]
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
('A' <= mountpoint[4] && mountpoint[4] <= 'Z') ||
|
||||||
|
('a' <= mountpoint[4] && mountpoint[4] <= 'z')
|
||||||
|
) &&
|
||||||
|
':' == mountpoint[5] && '\\' == mountpoint[6])
|
||||||
|
{
|
||||||
|
MountPointBuf[0] = '\\';
|
||||||
|
MountPointBuf[1] = '\\';
|
||||||
|
MountPointBuf[2] = mountpoint[2];
|
||||||
|
MountPointBuf[3] = '\\';
|
||||||
|
|
||||||
|
Size = 0;
|
||||||
|
if (0 != MultiByteToWideChar(CP_UTF8, 0, mountpoint + 4, -1, TempMountPointBuf, MAX_PATH))
|
||||||
|
Size = GetFullPathNameW(TempMountPointBuf, MAX_PATH, MountPointBuf + 4, 0);
|
||||||
|
|
||||||
|
if (0 == Size || MAX_PATH <= Size)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
Size = (Size + 4 + 1) * sizeof(WCHAR);
|
||||||
|
}
|
||||||
else if (
|
else if (
|
||||||
(
|
(
|
||||||
('A' <= mountpoint[0] && mountpoint[0] <= 'Z') ||
|
('A' <= mountpoint[0] && mountpoint[0] <= 'Z') ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user