]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirctrlg.cpp
Silence warning about truncation since the comment says it ok
[wxWidgets.git] / src / generic / dirctrlg.cpp
index 1d7741560990a99f1d7cbfe6b5d37e858715b39c..7eb65be47a632114c8b108d48ef041ed70543749 100644 (file)
@@ -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());