#if defined(__OS2__)
if (d[1] == ':')
{
- ::DosSetDefaultDisk(1 + wxToupper(d[0]) - _T('A'));
- // do not call DosSetCurrentDir when just changing drive,
- // since it requires e.g. "d:." instead of "d:"!
- if (d.length() == 2)
- return true;
+ ::DosSetDefaultDisk(wxToupper(d[0]) - _T('A') + 1);
+ // do not call DosSetCurrentDir when just changing drive,
+ // since it requires e.g. "d:." instead of "d:"!
+ if (d.length() == 2)
+ return true;
}
return (::DosSetCurrentDir(d.c_str()) == 0);
#elif defined(__UNIX__) || defined(__WXMAC__) || defined(__DOS__)
{
#if defined( __UNIX__ ) || defined(__OS2__)
// access() will take in count also symbolic links
- return access(path.fn_str(), W_OK) == 0;
+ return wxAccess(path.c_str(), W_OK) == 0;
#elif defined( __WINDOWS__ )
return wxCheckWin32Permission(path, GENERIC_WRITE);
#else
{
#if defined( __UNIX__ ) || defined(__OS2__)
// access() will take in count also symbolic links
- return access(path.fn_str(), R_OK) == 0;
+ return wxAccess(path.c_str(), R_OK) == 0;
#elif defined( __WINDOWS__ )
return wxCheckWin32Permission(path, GENERIC_READ);
#else
{
#if defined( __UNIX__ ) || defined(__OS2__)
// access() will take in count also symbolic links
- return access(path.fn_str(), X_OK) == 0;
+ return wxAccess(path.c_str(), X_OK) == 0;
#elif defined( __WINDOWS__ )
return wxCheckWin32Permission(path, GENERIC_EXECUTE);
#else