do not add files in wxDebugReport::AddFile if copy failed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2010-07-25 11:26:04 +00:00
parent b2025b311a
commit c02f03d563
2 changed files with 9 additions and 5 deletions

View File

@@ -268,8 +268,10 @@ wxDebugReport::AddFile(const wxString& filename, const wxString& description)
// we need to copy the file to the debug report directory: give it the
// same name there
name = fn.GetFullName();
wxCopyFile(fn.GetFullPath(),
wxFileName(GetDirectory(), name).GetFullPath());
if (!wxCopyFile(fn.GetFullPath(),
wxFileName(GetDirectory(), name).GetFullPath()))
return;
}
else // file relative to the report directory
{