Index: openacs-4/contrib/obsolete-packages/mp3-jukebox/www/admin/mp3-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3-jukebox/www/admin/mp3-add-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/obsolete-packages/mp3-jukebox/www/admin/mp3-add-2.tcl 5 Sep 2002 10:41:44 -0000 1.2 +++ openacs-4/contrib/obsolete-packages/mp3-jukebox/www/admin/mp3-add-2.tcl 27 Jan 2003 21:20:37 -0000 1.3 @@ -69,7 +69,7 @@ set target_filename "[ad_parameter MP3FileLocation]/$client_filename" -file copy -force $tmp_filename $target_filename +file copy -force -- $tmp_filename $target_filename #regsub www [acs_root_dir] "bin/mp3_file_scan" script_path Index: openacs-4/contrib/obsolete-packages/mp3-jukebox/www/admin/scanner.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3-jukebox/www/admin/scanner.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/obsolete-packages/mp3-jukebox/www/admin/scanner.tcl 5 Sep 2002 10:41:44 -0000 1.3 +++ openacs-4/contrib/obsolete-packages/mp3-jukebox/www/admin/scanner.tcl 27 Jan 2003 21:20:37 -0000 1.4 @@ -39,9 +39,9 @@ } set target_filename "[ad_parameter MP3FileLocation]/$client_filename" - file copy -force "$staging_filename" "$target_filename" + file copy -force -- "$staging_filename" "$target_filename" ns_log notice "DELETE:$staging_filename" - file delete -force "$staging_filename" + file delete -force -- "$staging_filename" set mp3_info_list [exec "[acs_root_dir]/packages/mp3-jukebox/bin/mp3_file_scan" "$target_filename"] Index: openacs-4/packages/acs-content-repository/tcl/content-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-content-repository/tcl/content-procs.tcl 14 Jan 2003 00:38:41 -0000 1.7 +++ openacs-4/packages/acs-content-repository/tcl/content-procs.tcl 27 Jan 2003 21:19:34 -0000 1.8 @@ -73,14 +73,7 @@ if { $move_p } { file rename -- $client_filename [cr_fs_path]$content_file } else { - # 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 } return $content_file Index: openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl 21 Jan 2003 21:37:10 -0000 1.9 +++ openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl 27 Jan 2003 21:19:56 -0000 1.10 @@ -309,7 +309,7 @@ set backup_path "${file_path}.orig" if { [file exists $file_path] && ![file exists $backup_path] } { ns_log Notice "lang::catalog::export_messages_to_file - Backing up catalog file $file_path" - file copy $file_path $backup_path + file copy -- $file_path $backup_path } else { ns_log Notice "lang::catalog::export_messages_to_file - Not backing up $file_path as backup file already exists" } Index: openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 3 Dec 2002 17:11:20 -0000 1.18 +++ openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 27 Jan 2003 21:19:56 -0000 1.19 @@ -182,7 +182,7 @@ regexp {\.([^.]+)$} $file match file_ending # Attempt a backup of the file first. Do not overwrite an old backup file. - if { [catch "file copy $full_file_path \"${full_file_path}.orig\"" errmsg] } { + if { [catch "file -- copy $full_file_path \"${full_file_path}.orig\"" errmsg] } { ns_log Warning [list lang::util::replace_temporary_tags_with_lookups - The file $full_file_path \ could not be backed up before message key extraction since backup file \ ${full_file_path}.orig already exists] @@ -574,7 +574,7 @@ if { $n > 0 } { # backup original file - fail silently if backup already exists - if { [catch {file copy $file_name $file_name.orig}] } { } + if { [catch {file copy -- $file_name $file_name.orig}] } { } set fp [open $file_name "w"] puts $fp $out Index: openacs-4/packages/acs-tcl/tcl/00-database-procs-oracle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs-oracle.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-tcl/tcl/00-database-procs-oracle.tcl 14 Aug 2002 18:56:07 -0000 1.17 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs-oracle.tcl 27 Jan 2003 21:20:12 -0000 1.18 @@ -242,12 +242,7 @@ blob_get_file { if {[file exists $content]} { - set file [lindex $args 0] - set ifp [open $content r] - set ofp [open $file w] - ns_cpfp $ifp $ofp - close $ifp - close $ofp + file copy -- $content $file return $selection } else { error "file: $content doesn't exist" @@ -258,6 +253,7 @@ if {[file exists $content]} { set ofp [open $content r] + fconfigure $ofp -encoding binary ns_writefp $ofp close $ofp return $selection 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.37 -r1.38 --- openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 21 Dec 2002 22:30:20 -0000 1.37 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 27 Jan 2003 21:20:12 -0000 1.38 @@ -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]} { Index: openacs-4/packages/file-storage/tcl/file-storage-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.tcl,v diff -u -r1.28 -r1.29 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 18 Nov 2002 18:01:04 -0000 1.28 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 27 Jan 2003 21:20:25 -0000 1.29 @@ -551,13 +551,7 @@ set cr_path [cr_fs_path $storage_area_key] set cr_file_name [db_string select_file_name {}] - set ifp [open "${cr_path}${cr_file_name}" r] - set ofp [open [file join ${path} ${file_name}] w] - - ns_cpfp $ifp $ofp - - close $ifp - close $ofp + file copy -- "${cr_path}${cr_file_name}" [file join ${path} ${file_name}] } }