X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d5231db07a04de50075f18fd605d3d87234a33b..15d5a9470be940a5bac66181a9e4c27d47d56558:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 9d83a8dbac..997c0ca6ae 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1086,11 +1086,15 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) // instead of our code if available // // NB: 3rd parameter is bFailIfExists i.e. the inverse of overwrite - return ::CopyFile(file1, file2, !overwrite) != 0; + if ( !::CopyFile(file1, file2, !overwrite) ) + { + wxLogSysError(_("Failed to copy the file '%s' to '%s'"), + file1.c_str(), file2.c_str()); + + return FALSE; + } #elif defined(__WXPM__) - if (::DosCopy(file2, file2, overwrite ? DCPY_EXISTING : 0) == 0) - return TRUE; - else + if ( ::DosCopy(file2, file2, overwrite ? DCPY_EXISTING : 0) != 0 ) return FALSE; #else // !Win32 wxStructStat fbuf; @@ -1169,9 +1173,9 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) return FALSE; } #endif // OS/2 || Mac +#endif // __WXMSW__ && __WIN32__ return TRUE; -#endif // __WXMSW__ && __WIN32__ } bool @@ -1404,6 +1408,8 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) #ifdef HAVE_WGETCWD #if wxUSE_UNICODE_MSLU if ( wxGetOsVersion() != wxWIN95 ) + #else + char *cbuf = NULL; // never really used because needsANSI will always be FALSE #endif { ok = _wgetcwd(buf, sz) != NULL;