Win98: GetDiskFreeSpace fails on shares

Dave Korn
Thu Jun 16 13:16:00 GMT 2005

----Original Message----
>From: Corinna Vinschen
>Sent: 16 June 2005 13:40

> It turned out to be the GetDiskFreeSpace function which fails with
> This does not happen when the share is accessed using a drive letter:

  Did you verify the UNC path is properly terminated with a trailing slash?

> Funny though, that this is supposed to be a bug in the first Win 95
> release 
> only, according to MSDN:
>   Windows 95:  The initial release of Windows 95 does not support UNC
>   paths. Therefore, you must temporarily map the UNC path to a drive
>   letter, query the free disk space on the drive, then remove the
> temporary mapping. 
>   Windows 95 OSR2 and later support UNC paths.
> Can anybody reproduce this or is this just on my machine?
> Anyway, does anybody here have a nice idea how we can workaround this for
> 9x in the statvfs function in

  I don't have access to a win98 system right now, but I guess the first
thing I'd try would be to see if the .....Ex version of the function worked
any better; often, .....Ex functions have very different implementations
internally as compared to the non-Ex versions.  Temporarily mapping and
un-mapping drive letters doesn't seem very nice to me.....

Can't think of a witty .sigline today....

More information about the Cygwin-developers mailing list