X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d9ade1df2f02bbb86987487ae35f0eaa0eee4517..f43bb7e246603413a43382e43e480972687eca92:/src/common/textfile.cpp diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index 6a82fa5860..28593b36f5 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -6,14 +6,14 @@ // Created: 03.04.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ // headers // ============================================================================ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "textfile.h" #endif @@ -183,8 +183,12 @@ bool wxTextFile::OnRead(wxMBConv& conv) bool wxTextFile::OnWrite(wxTextFileType typeNew, wxMBConv& conv) { wxFileName fn = m_strBufferName; + + // We do NOT want wxPATH_NORM_CASE here, or the case will not + // be preserved. if ( !fn.IsAbsolute() ) - fn.Normalize(); + fn.Normalize(wxPATH_NORM_ENV_VARS | wxPATH_NORM_DOTS | wxPATH_NORM_TILDE | + wxPATH_NORM_ABSOLUTE | wxPATH_NORM_LONG); wxTempFile fileTmp(fn.GetFullPath());