Browse Source

copy_to() should imply binary form

David Rose 16 years ago
parent
commit
168cc68e65
1 changed files with 4 additions and 2 deletions
  1. 4 2
      dtool/src/dtoolutil/filename.cxx

+ 4 - 2
dtool/src/dtoolutil/filename.cxx

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