Index: openacs-4/packages/assessment/tcl/as-qti-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-qti-procs.tcl,v diff -u -r1.50.2.3 -r1.50.2.4 --- openacs-4/packages/assessment/tcl/as-qti-procs.tcl 8 Aug 2020 11:19:23 -0000 1.50.2.3 +++ openacs-4/packages/assessment/tcl/as-qti-procs.tcl 21 May 2021 07:40:57 -0000 1.50.2.4 @@ -21,7 +21,7 @@ # Create a temporary directory file mkdir $tmpdirectory # UNZIP the zip file in the temporary directory - catch { exec unzip ${tmp_dir} -d $tmpdirectory } outMsg + util::unzip -source ${tmp_dir} -destination $tmpdirectory set url_assessment {} # Read the content of the temporary directory @@ -53,7 +53,7 @@ # Create a temporary directory file mkdir $tmpdirectory # UNZIP the zip file in the temporary directory - catch { exec unzip ${tmp_dir} -d $tmpdirectory } outMsg + util::unzip -source ${tmp_dir} -destination $tmpdirectory set assessment_id {} # Read the content of the temporary directory Index: openacs-4/packages/assessment/www/asm-admin/unzip-file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/unzip-file.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/assessment/www/asm-admin/unzip-file.tcl 7 Aug 2017 23:48:04 -0000 1.5 +++ openacs-4/packages/assessment/www/asm-admin/unzip-file.tcl 21 May 2021 07:40:56 -0000 1.5.2.1 @@ -22,7 +22,7 @@ file mkdir $tmpdirectory # UNZIP the zip file in the temporary directory -catch { exec unzip ${zipfile.tmpfile} -d $tmpdirectory } outMsg +util::unzip -source ${zipfile.tmpfile} -destination $tmpdirectory # Read the content of the temporary directory foreach file_i [ glob -directory $tmpdirectory *{.xml} ] { Index: openacs-4/packages/file-storage/www/folder-zip-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-zip-add.tcl,v diff -u -r1.11.2.7 -r1.11.2.8 --- openacs-4/packages/file-storage/www/folder-zip-add.tcl 31 Mar 2021 11:32:54 -0000 1.11.2.7 +++ openacs-4/packages/file-storage/www/folder-zip-add.tcl 21 May 2021 07:40:55 -0000 1.11.2.8 @@ -141,6 +141,11 @@ # Uncompress the file. # set unzip_binary [string trim [parameter::get -parameter UnzipBinary]] + if {$unzip_binary ne ""} { + ns_log warning "package parameter UnzipBinary of file-storage is ignored, using systemwide util::unzip" + } + + set unzip_binary [util::which unzip] if { $unzip_binary ne "" } { # # Create temp directory to unzip. @@ -151,19 +156,14 @@ # # Unzip. # - # More flexible parameter design could be: - # zip {unzip -jd {out_path} {in_file}} tar {tar xf {in_file} {out_path}} tgz {tar xzf {in_file} {out_path}} - # - # save paths! get rid of -j switch --DAVEB 20050628 - # - catch { exec $unzip_binary -d $unzip_path ${upload_file.tmpfile} } errmsg + util::unzip -source ${upload_file.tmpfile} -destination $unzip_path # # Get two lists of the files to upload, with and without their full path. # set upload_files [list] set upload_tmpfiles [list] - foreach file [ad_find_all_files "$unzip_path"] { + foreach file [ad_find_all_files $unzip_path] { lappend upload_files [regsub "^$unzip_path\/" $file {}] lappend upload_tmpfiles $file } Index: openacs-4/packages/richtext-ckeditor4/tcl/richtext-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/richtext-ckeditor4/tcl/richtext-procs.tcl,v diff -u -r1.14.2.12 -r1.14.2.13 --- openacs-4/packages/richtext-ckeditor4/tcl/richtext-procs.tcl 16 Dec 2020 18:55:43 -0000 1.14.2.12 +++ openacs-4/packages/richtext-ckeditor4/tcl/richtext-procs.tcl 21 May 2021 07:40:57 -0000 1.14.2.13 @@ -378,7 +378,7 @@ # foreach url [dict get $resource_info downloadURLs] { set fn [file tail $url] - set output [exec $unzip -o $resourceDir/$version/$fn -d $resourceDir/$version] + util::unzip -overwrite -source $resourceDir/$version/$fn -destination $resourceDir/$version file rename -- \ $resourceDir/$version/ckeditor \ $resourceDir/$version/$ck_package