Forum OpenACS Development: Re: ns_cpfp broken in AOLserver 3.5.1

Collapse
Posted by Tom Jackson on

Here is a sample of what can be done to replace total file copy using ns_cpfp with file copy.

Index: content-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/acs-content-repository/tcl/content-procs.tcl,v
retrieving revision 1.6
diff -r1.6 content-procs.tcl
76,83c76
<         # JCD: not sure why ns_cpfp is used.  tcl file copy is better 
<         # since it is smarter about buffer sizes.
<         set ifp [open $client_filename r]
<         set ofp [open [cr_fs_path]$content_file w]
<         
<         ns_cpfp $ifp $ofp
<         close $ifp
<         close $ofp
---

>         file copy $client_filename [cr_fs_path]$content_file

Bart, I'll add that one to my test case, thanks.