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.4.6.5 -r1.4.6.6 --- openacs-4/packages/file-storage/www/folder-zip-add.tcl 29 Jul 2014 11:14:19 -0000 1.4.6.5 +++ openacs-4/packages/file-storage/www/folder-zip-add.tcl 23 Oct 2014 07:40:44 -0000 1.4.6.6 @@ -125,6 +125,8 @@ set i 0 set number_upload_files [llength $upload_files] + set unzip_path_list_len [llength [file split $unzip_path]] + foreach upload_file $upload_files tmpfile $upload_tmpfiles { set this_file_id $file_id set this_title $title @@ -137,8 +139,11 @@ # the folders if they don't exist set p_f_id $folder_id set file_paths [file split [file dirname $upload_file]] - ns_log notice "\n DAVEB1 \n '${file_paths}'" - if {"." ne $file_paths && [llength $file_paths]} { + + # remove unzip_path portion by selecting remaining part of list + set file_paths [lrange $file_paths $unzip_path_list_len end] + + if {"." ne $file_paths && [llength $file_paths] > 0} { # make sure every folder exists set path "" foreach p $file_paths { @@ -225,4 +230,4 @@ set unpack_available_p [expr {[string trim [parameter::get -parameter UnzipBinary]] ne ""}] -ad_return_template \ No newline at end of file +ad_return_template