X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23b8a2629903027852d7506162b7b0f44bd9f912..eec960fa8987d15fd87e249c8441474188124425:/src/common/filename.cpp diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 1be91db75f..b4ea82e56a 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -68,6 +68,9 @@ #endif #ifndef WX_PRECOMP + #ifdef __WXMSW__ + #include "wx/msw/wrapwin.h" // For GetShort/LongPathName + #endif #include "wx/dynarray.h" #include "wx/intl.h" #include "wx/log.h" @@ -81,12 +84,8 @@ #include "wx/file.h" #include "wx/dynlib.h" -// For GetShort/LongPathName -#ifdef __WIN32__ -#include "wx/msw/wrapwin.h" -#if defined(__MINGW32__) -#include "wx/msw/gccpriv.h" -#endif +#if defined(__WIN32__) && defined(__MINGW32__) + #include "wx/msw/gccpriv.h" #endif #ifdef __WXWINCE__ @@ -1047,7 +1046,9 @@ bool wxFileName::Normalize(int flags, #include #endif -bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, wxString& targetFilename, wxString* arguments) +bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, + wxString& targetFilename, + wxString* arguments) { wxString path, file, ext; wxSplitPath(shortcutPath, & path, & file, & ext); @@ -1076,6 +1077,8 @@ bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, wxString& targe MAX_PATH); hres = ppf->Load(wsz, 0); + ppf->Release(); + if (SUCCEEDED(hres)) { wxChar buf[2048]; @@ -1096,11 +1099,13 @@ bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, wxString& targe } } } + + psl->Release(); } - psl->Release(); return success; } -#endif + +#endif // __WIN32__ && !__WXWINCE__ // ---------------------------------------------------------------------------- @@ -2034,7 +2039,10 @@ wxULongLong wxFileName::GetSize(const wxString &filename) if (!wxFileExists(filename)) return wxInvalidSize; -#ifdef __WIN32__ +#if defined(__WXPALMOS__) + // TODO + return wxInvalidSize; +#elif defined(__WIN32__) wxFileHandle f(filename, wxFileHandle::Read); if (!f.IsOk()) return wxInvalidSize;