+// return a string with the volume par
+static wxString wxGetVolumeString(const wxString& volume, wxPathFormat format)
+{
+ wxString path;
+
+ if ( !volume.empty() )
+ {
+ format = wxFileName::GetFormat(format);
+
+ // Special Windows UNC paths hack, part 2: undo what we did in
+ // SplitPath() and make an UNC path if we have a drive which is not a
+ // single letter (hopefully the network shares can't be one letter only
+ // although I didn't find any authoritative docs on this)
+ if ( format == wxPATH_DOS && volume.length() > 1 )
+ {
+ path << wxFILE_SEP_PATH_DOS << wxFILE_SEP_PATH_DOS << volume;
+ }
+ else if ( format == wxPATH_DOS || format == wxPATH_VMS )
+ {
+ path << volume << wxFileName::GetVolumeSeparator(format);
+ }
+ // else ignore
+ }
+
+ return path;
+}
+