copy_to() should imply binary form

This commit is contained in:
David Rose 2009-09-07 02:04:54 +00:00
parent 8d2072da9c
commit 168cc68e65
1 changed files with 4 additions and 2 deletions

View File

@ -2453,13 +2453,15 @@ rename_to(const Filename &other) const {
////////////////////////////////////////////////////////////////////
bool Filename::
copy_to(const Filename &other) const {
Filename this_filename = Filename::binary_filename(*this);
pifstream in;
if (!open_read(in)) {
if (!this_filename.open_read(in)) {
return false;
}
Filename other_filename = Filename::binary_filename(other);
pofstream out;
if (!other.open_write(out)) {
if (!other_filename.open_write(out)) {
return false;
}