forked from organicmaps/organicmaps
[coding] Fixed copying an empty file.
This commit is contained in:
parent
df1dba7695
commit
05d01f8072
1 changed files with 3 additions and 0 deletions
|
@ -300,6 +300,9 @@ bool CopyFileX(string const & fOld, string const & fNew)
|
|||
|
||||
if (ifs.is_open() && ofs.is_open())
|
||||
{
|
||||
if (ifs.peek() == ifstream::traits_type::eof())
|
||||
return true;
|
||||
|
||||
ofs << ifs.rdbuf();
|
||||
ofs.flush();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue