Re: [phodav PATCH 2/3 v7] spice-webdavd-windows: Check for mapped shared folder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 27, 2016 at 4:36 PM, Marc-André Lureau <mlureau@xxxxxxxxxx> wrote:
>> Rather than the user name of the driver, it would be more reliable to check
>> the connection details, with a function such as
>> WNetGetResourceInformation(). (I haven't looked in details if this is the
>> right function)
>
> So I tested this function, and it doesn't actually return the local name
> (drive letter). It might return this on older Windows, but on the newer
> ones, since drive letters are per user, it doesn't return anything.
> (localname is null).

I would rather check if there is a remote name (the webdav server). If you can find one, I suppose it means it is mapped.

Well that would be fine for only checking whether the drive is connected, or not,
but we have to get the driver letter, so that we can unmap it later.

The drive shouldn't be mapped before starting the service, this is just a safety check,
but we should still unmap it later. 
--
Lukas Venhoda
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]