HANDLE h = ::CreateFile(filename, access, 0, NULL,
disposition, attributes, NULL);
- return wxOpenOSFHandle(h, 0);
+ return wxOpenOSFHandle(h, wxO_BINARY);
}
#endif // wxOpenOSFHandle
return file->Open(path, _T("w+b"));
#else // wx_fdopen
int fd = wxTempOpen(path, deleteOnClose);
- if (fd != -1)
+ if (fd == -1)
return false;
file->Attach(wx_fdopen(fd, "w+b"));
return file->IsOpened();
// not 9x
bool ok;
FILETIME ftAccess, ftCreate, ftWrite;
- if ( IsDir() )
+ if ( IsDir() )
{
// implemented in msw/dir.cpp
extern bool wxGetDirectoryTimes(const wxString& dirname,
return true;
}
#elif defined(__UNIX_LIKE__) || defined(__WXMAC__) || defined(__OS2__) || (defined(__DOS__) && defined(__WATCOMC__))
+ // no need to test for IsDir() here
wxStructStat stBuf;
if ( wxStat( GetFullPath().c_str(), &stBuf) == 0 )
{