X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f3d9587ab2b78d8c409f7e5e08ea6eb532057b5..1d7ea62e9e91bf5717feafb361e89ac8c7d32913:/src/common/filename.cpp diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 80ed64811c..c1a128ffc1 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -614,11 +614,11 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp) // FIXME. Create \temp dir? dir = wxT("\\"); } - path = dir + wxT("\\") + prefix; + path = dir + wxT("\\") + name; int i = 1; while (FileExists(path)) { - path = dir + wxT("\\") + prefix ; + path = dir + wxT("\\") + name ; path << i; i ++; } @@ -1548,16 +1548,17 @@ wxString wxFileName::GetLongPath() const wxDynamicLibrary dllKernel(_T("kernel32")); -#ifdef _UNICODE - #define ADD_STR_SFX(name) L#name L"W" -#else - #define ADD_STR_SFX(name) #name "A" -#endif + const wxChar* GetLongPathName = _T("GetLongPathName") +#if wxUSE_UNICODE + _T("W"); +#else // ANSI + _T("A"); +#endif // Unicode/ANSI - if ( dllKernel.HasSymbol(ADD_STR_SFX(GetLongPathName)) ) + if ( dllKernel.HasSymbol(GetLongPathName) ) { s_pfnGetLongPathName = (GET_LONG_PATH_NAME) - dllKernel.GetSymbol(ADD_STR_SFX(GetLongPathName)); + dllKernel.GetSymbol(GetLongPathName); } // note that kernel32.dll can be unloaded, it stays in memory