]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fileconf.cpp
added wxDir::Traverse
[wxWidgets.git] / src / common / fileconf.cpp
index 0d5b0a4ae3132ede1a8a2547516dff0f1b1db0f6..b8fec80df7fd69b353769b2fb99f4c25fcf04b5c 100644 (file)
@@ -199,19 +199,7 @@ wxString wxFileConfig::GetGlobalDir()
   #elif defined(__WXSTUBS__)
     wxASSERT_MSG( FALSE, wxT("TODO") ) ;
   #elif defined(__WXMAC__)
-  {
-               short           vRefNum  ;
-               long            dirID ;
-               
-               if ( FindFolder( (short) kOnSystemDisk, kPreferencesFolderType, kDontCreateFolder, &vRefNum, &dirID) == noErr)
-               {
-                       FSSpec file ;
-                       if ( FSMakeFSSpec( vRefNum , dirID , "\p" , &file ) == noErr )
-                       {
-                               strDir = wxMacFSSpec2UnixFilename( &file ) + "/" ;
-                       }
-               }
-  }
+       strDir = wxMacFindFolder(  (short) kOnSystemDisk, kPreferencesFolderType, kDontCreateFolder ) ;
   #else // Windows
     wxChar szWinDir[MAX_PATH];
     ::GetWindowsDirectory(szWinDir, MAX_PATH);
@@ -809,7 +797,7 @@ bool wxFileConfig::Flush(bool /* bCurrentOnly */)
 
   bool ret = file.Commit();
 
-#ifdef __WXMAC__
+#if defined(__WXMAC__) && !defined(__UNIX__)
   if ( ret )
   {
        FSSpec spec ;
@@ -823,7 +811,7 @@ bool wxFileConfig::Flush(bool /* bCurrentOnly */)
                FSpSetFInfo( &spec , &finfo ) ;
        }
   }
-#endif // __WXMAC__
+#endif // __WXMAC__ && !__UNIX__
 
 #ifdef __UNIX__
   // restore the old umask if we changed it