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 ( DirExists() ) // Don't use IsDir, because it returns false even if it's a directory
{
// implemented in msw/dir.cpp
extern bool wxGetDirectoryTimes(const wxString& dirname,