wxMkdir() has 2nd param under Unix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a0d8a30528
commit
7708abe9cd
@ -982,16 +982,21 @@ bool wxRemoveFile(const wxString& file)
|
||||
|
||||
bool wxMkdir(const wxString& dir, int perm)
|
||||
{
|
||||
/*
|
||||
#if defined( __WXMAC__ )
|
||||
strcpy( gwxMacFileName , dir ) ;
|
||||
wxUnix2MacFilename( gwxMacFileName ) ;
|
||||
const char *dirname = gwxMacFileName;
|
||||
#else
|
||||
#else // !Mac
|
||||
const char *dirname = dir.c_str();
|
||||
#endif
|
||||
#endif // Mac/!Mac
|
||||
|
||||
// assume mkdir() has 2 args on non Windows platforms and on Windows too
|
||||
// for the GNU compiler
|
||||
#if !defined(__WXMSW__) || (defined(__GNUWIN32__) && !defined(__MINGW32__))
|
||||
if ( mkdir(dirname, perm) != 0 )
|
||||
#else // MSW
|
||||
if ( mkdir(dirname) != 0 )
|
||||
#endif // !MSW/MSW
|
||||
{
|
||||
wxLogSysError(_("Directory '%s' couldn't be created"), dirname);
|
||||
|
||||
@ -999,22 +1004,6 @@ bool wxMkdir(const wxString& dir, int perm)
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
*/
|
||||
|
||||
#if defined(__WXSTUBS__)
|
||||
return FALSE;
|
||||
#elif defined(__VMS__)
|
||||
return FALSE;
|
||||
#elif defined( __WXMAC__ )
|
||||
strcpy( gwxMacFileName , dir ) ;
|
||||
wxUnix2MacFilename( gwxMacFileName ) ;
|
||||
return (mkdir(gwxMacFileName , 0 ) == 0);
|
||||
#elif (defined(__GNUWIN32__) && !defined(__MINGW32__)) || !defined(__WXMSW__)
|
||||
return (mkdir (WXSTRINGCAST dir, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == 0);
|
||||
#else
|
||||
return (mkdir(WXSTRINGCAST dir) == 0);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
bool wxRmdir(const wxString& dir, int WXUNUSED(flags))
|
||||
|
Loading…
Reference in New Issue
Block a user