Fixed & improved file handling on OS/2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -619,21 +619,7 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
|
||||
}
|
||||
#endif // Win32/16
|
||||
|
||||
#elif defined(__WXPM__)
|
||||
// for now just create a file
|
||||
//
|
||||
// future enhancements can be to set some extended attributes for file
|
||||
// systems OS/2 supports that have them (HPFS, FAT32) and security
|
||||
// (HPFS386)
|
||||
static const wxChar *szMktempSuffix = wxT("XXX");
|
||||
path << dir << _T('/') << name << szMktempSuffix;
|
||||
|
||||
// Temporarily remove - MN
|
||||
#ifndef __WATCOMC__
|
||||
::DosCreateDir(wxStringBuffer(path, MAX_PATH), NULL);
|
||||
#endif
|
||||
|
||||
#else // !Windows, !OS/2
|
||||
#else // !Windows
|
||||
if ( dir.empty() )
|
||||
{
|
||||
#if defined(__WXMAC__) && !defined(__DARWIN__)
|
||||
@@ -648,7 +634,7 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
|
||||
if ( dir.empty() )
|
||||
{
|
||||
// default
|
||||
#ifdef __DOS__
|
||||
#if defined(__DOS__) || defined(__OS2__)
|
||||
dir = _T(".");
|
||||
#else
|
||||
dir = _T("/tmp");
|
||||
@@ -1526,7 +1512,7 @@ wxPathFormat wxFileName::GetFormat( wxPathFormat format )
|
||||
{
|
||||
if (format == wxPATH_NATIVE)
|
||||
{
|
||||
#if defined(__WXMSW__) || defined(__WXPM__) || defined(__DOS__)
|
||||
#if defined(__WXMSW__) || defined(__OS2__) || defined(__DOS__)
|
||||
format = wxPATH_DOS;
|
||||
#elif defined(__WXMAC__) && !defined(__DARWIN__)
|
||||
format = wxPATH_MAC;
|
||||
|
||||
Reference in New Issue
Block a user