UNC, getDriveFromPath and getVolumeLabel


I need to validate the root of pathnames that can be normal path (e.g. c:\MyFolder) or UNC ones (e.g. \MyServer\MyShare\MyFolder).
I was expecting to be able to retrieve the root (resp. c:\ and \MyServer\MyShare) using getVolumeLabel or getDriveFromPath, but none of seems able to retrieve \MyServer\MyShare\ for an UNC path…
So far I use Shell32’s PathStripToRoot to achieve this job under Windows but would prefer a cross platform solution… Any idea and/or solution with existing Juce functions?



Not sure, really… Maybe I could just change getDriveFromPath to use PathStripToRoot if the file starts with a \ ?

Well this works for normal local paths too so you could just replace the win32 code with this…