Index: openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs-postgresql.tcl,v diff -u -r1.35.2.2 -r1.35.2.3 --- openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 21 Jan 2003 13:47:53 -0000 1.35.2.2 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 5 Feb 2003 23:24:43 -0000 1.35.2.3 @@ -466,11 +466,7 @@ switch $storage_type { file { if {[file exists $content]} { - set ifp [open $content r] - set ofp [open $file w] - ns_cpfp $ifp $ofp - close $ifp - close $ofp + file copy -- $content $file } else { error "file: $content doesn't exist" } @@ -489,11 +485,7 @@ } } } elseif {[file exists $content]} { - set ifp [open $content r] - set ofp [open $file w] - ns_cpfp $ifp $ofp - close $ifp - close $ofp + file copy -- $content $file } elseif {[regexp {^[0-9]+$} $content match]} { ns_pg blob_select_file $db $content $file } else { @@ -508,6 +500,7 @@ file { if {[file exists $content]} { set ofp [open $content r] + fconfigure $ofp -encoding binary ns_writefp $ofp close $ofp } else { @@ -533,6 +526,7 @@ } } elseif {[file exists $content]} { set ofp [open $content r] + fconfigure $ofp -encoding binary ns_writefp $ofp close $ofp } elseif {[regexp {^[0-9]+$} $content match]} {