X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d38315df30415b030d93172123920d69c5c5e3b6..d485bda109d5ef0fef36a3f737549e9b9f54baab:/src/msw/dir.cpp diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp index 81c312e825..2eea8fe7ff 100644 --- a/src/msw/dir.cpp +++ b/src/msw/dir.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: msw/dir.cpp +// Name: src/msw/dir.cpp // Purpose: wxDir implementation for Win32 // Author: Vadim Zeitlin // Modified by: @@ -67,7 +67,7 @@ inline void FreeFindData(FIND_DATA fd) inline FIND_DATA FindFirst(const wxString& spec, FIND_STRUCT *finddata) { - return ::FindFirstFile(spec.fn_str(), finddata); + return ::FindFirstFile(spec.t_str(), finddata); } inline bool FindNext(FIND_DATA fd, FIND_STRUCT *finddata) @@ -208,7 +208,7 @@ bool wxDirData::Read(wxString *filename) if ( err != ERROR_FILE_NOT_FOUND && err != ERROR_NO_MORE_FILES ) { - wxLogSysError(err, _("Can not enumerate files in directory '%s'"), + wxLogSysError(err, _("Cannot enumerate files in directory '%s'"), m_dirname.c_str()); } #endif // __WIN32__ @@ -343,9 +343,13 @@ wxString wxDir::GetName() const return name; } -wxDir::~wxDir() +void wxDir::Close() { - delete M_DIR; + if ( m_data ) + { + delete m_data; + m_data = NULL; + } } // ----------------------------------------------------------------------------