Fix error reporting for wxCopyFile() under Unix

Check if copying file actually succeeded, any IO errors that could happen in
it were previously just completely ignored.

Closes #17638.
This commit is contained in:
samurajj
2016-08-22 14:17:43 +02:00
committed by Vadim Zeitlin
parent 1222a9d769
commit a93dcc531c

View File

@@ -1042,7 +1042,11 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite)
return false;
}
wxDoCopyFile(fileIn, fbuf, file2, overwrite);
if ( !wxDoCopyFile(fileIn, fbuf, file2, overwrite) )
{
wxLogError(_("Error copying the file '%s' to '%s'."), file1, file2);
return false;
}
#if defined(__WXMAC__)
// copy the resource fork of the file too if it's present