changed wxFileName::Normalize signature to allow or-combination of flags and reverted Julian's hack-fix to wxTextFile

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-02-02 23:14:45 +00:00
parent fb57629105
commit 32a0d013e9
4 changed files with 5 additions and 4 deletions

View File

@@ -522,7 +522,7 @@ otherwise.
\membersection{wxFileName::Normalize}\label{wxfilenamenormalize} \membersection{wxFileName::Normalize}\label{wxfilenamenormalize}
\func{bool}{Normalize}{\param{wxPathNormalize }{flags = wxPATH\_NORM\_ALL}, \param{const wxString\& }{cwd = wxEmptyString}, \param{wxPathFormat }{format = wxPATH\_NATIVE}} \func{bool}{Normalize}{\param{int }{flags = wxPATH\_NORM\_ALL}, \param{const wxString\& }{cwd = wxEmptyString}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
operations on the path operations on the path
normalize the path: with the default flags value, the path will be normalize the path: with the default flags value, the path will be

View File

@@ -242,7 +242,7 @@ public:
// variables will be expanded in it // variables will be expanded in it
// //
// this may be done using another (than current) value of cwd // this may be done using another (than current) value of cwd
bool Normalize(wxPathNormalize flags = wxPATH_NORM_ALL, bool Normalize(int flags = wxPATH_NORM_ALL,
const wxString& cwd = wxEmptyString, const wxString& cwd = wxEmptyString,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);

View File

@@ -732,7 +732,7 @@ bool wxFileName::Rmdir( const wxString &dir )
// path normalization // path normalization
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
bool wxFileName::Normalize(wxPathNormalize flags, bool wxFileName::Normalize(int flags,
const wxString& cwd, const wxString& cwd,
wxPathFormat format) wxPathFormat format)
{ {

View File

@@ -187,7 +187,8 @@ bool wxTextFile::OnWrite(wxTextFileType typeNew, wxMBConv& conv)
// We do NOT want wxPATH_NORM_CASE here, or the case will not // We do NOT want wxPATH_NORM_CASE here, or the case will not
// be preserved. // be preserved.
if ( !fn.IsAbsolute() ) if ( !fn.IsAbsolute() )
fn.Normalize((wxPathNormalize) (wxPATH_NORM_ENV_VARS | wxPATH_NORM_DOTS | wxPATH_NORM_TILDE | wxPATH_NORM_ABSOLUTE | wxPATH_NORM_LONG)); fn.Normalize(wxPATH_NORM_ENV_VARS | wxPATH_NORM_DOTS | wxPATH_NORM_TILDE |
wxPATH_NORM_ABSOLUTE | wxPATH_NORM_LONG);
wxTempFile fileTmp(fn.GetFullPath()); wxTempFile fileTmp(fn.GetFullPath());