[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1939] trunk/LedgerSMB/AM.pm



Revision: 1939
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1939&view=rev
Author:   tetragon
Date:     2007-12-04 12:01:13 -0800 (Tue, 04 Dec 2007)

Log Message:
-----------
Encoding fixes for the backup routines

Modified Paths:
--------------
    trunk/LedgerSMB/AM.pm

Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm	2007-12-04 20:00:43 UTC (rev 1938)
+++ trunk/LedgerSMB/AM.pm	2007-12-04 20:01:13 UTC (rev 1939)
@@ -2087,7 +2087,7 @@
 "${LedgerSMB::Sysconfig::backuppath}/$boundary.$globalDBname-$form->{dbversion}-$t[5]$t[4]$t[3].sql";
     $form->{OUT} = "$tmpfile";
 
-    open( OUT, '>', "$form->{OUT}" ) or $form->error("$form->{OUT} : $!");
+    open( OUT, '>:raw', "$form->{OUT}" ) or $form->error("$form->{OUT} : $!");
 
     # get sequences, functions and triggers
 
@@ -2132,8 +2132,9 @@
 
     if ( $form->{media} eq 'file' ) {
 
-        open( IN, '<', "$tmpfile" ) or $form->error("$tmpfile : $!");
+        open( IN, '<:raw', "$tmpfile" ) or $form->error("$tmpfile : $!");
         open( OUT, ">-" ) or $form->error("STDOUT : $!");
+        binmode( OUT, ':raw' );
 
         print OUT qq|Content-Type: application/file;\n|
           . qq|Content-Disposition: attachment; filename="$myconfig->{dbname}-$form->{dbversion}-$t[5]$t[4]$t[3].sql$suffix"\n\n|;
@@ -2411,3 +2412,4 @@
 1;
 
 =back
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.