X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e115ed2c71e11ea37c83ed44f3553523ec16560..c1d8296a78d1f630952fc5395e4072c8a654b8ef:/src/generic/dirctrlg.cpp diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 1d77415609..7eb65be47a 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dirctrlg.cpp +// Name: src/generic/dirctrlg.cpp // Purpose: wxGenericDirCtrl // Author: Harm van der Heijden, Robert Roebling, Julian Smart // Modified by: @@ -166,7 +166,17 @@ size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayI // Note: If _filesys is unsupported by some compilers, // we can always replace it by DosQueryFSAttach char filesysname[20]; +#ifdef __WATCOMC__ + ULONG cbBuffer = sizeof(filesysname); + PFSQBUFFER2 pfsqBuffer = (PFSQBUFFER2)filesysname; + APIRET rc = ::DosQueryFSAttach(name.fn_str(),0,FSAIL_QUERYNAME,pfsqBuffer,&cbBuffer); + if (rc != NO_ERROR) + { + filesysname[0] = '\0'; + } +#else _filesys(name.fn_str(), filesysname, sizeof(filesysname)); +#endif /* FAT, LAN, HPFS, CDFS, NFS */ int imageId; if (path == wxT("A:\\") || path == wxT("B:\\")) @@ -257,7 +267,9 @@ size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayI bool wxIsDriveAvailable(const wxString& dirName) { // FIXME_MGL - this method leads to hang up under Watcom for some reason -#ifndef __WATCOMC__ +#ifdef __WATCOMC__ + wxUnusedVar(dirName); +#else if ( dirName.Len() == 3 && dirName[1u] == wxT(':') ) { wxString dirNameLower(dirName.Lower());