added some error checking to wxCopyFile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e508a2b616
commit
c7386783a6
@ -1028,12 +1028,21 @@ wxCopyFile (const wxString& file1, const wxString& file2)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// VZ: should use a buffer here! (FIXME)
|
||||
bool ok = TRUE;
|
||||
while ((ch = getc (fd1)) != EOF)
|
||||
{
|
||||
(void) putc (ch, fd2);
|
||||
if ( ferror(fd2) )
|
||||
{
|
||||
ok = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fclose (fd1);
|
||||
fclose (fd2);
|
||||
return TRUE;
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user