Gustavo Tabares wrote:
>
> I'm having a problem with the code below and I'm not sure if there is
> a bug in win32api.GetVolumeInformation. There is a simple workaround,
> but I'm curious nonetheless. Any help is appreciated.
> ...
> The simple workaround is to add os.sep to the F: string in the last
> call to GetVolumeInformation; it runs properly. This also still breaks
> if you chdir back to the local C: drive.

It's not a bug.  When in doubt, always refer to the documentation.  From
http://msdn2.microsoft.com/en-us/library/aa364993.aspx:

/   lpRootPathName/
    [in] A pointer to a string that contains the root directory of the
    volume to be described.

    If this parameter is NULL, the root of the current directory is
    used. A trailing backslash is required. For example, you specify
    \\MyServer\MyShare as \\MyServer\MyShare\, or the C drive as "C:\".

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to