Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v diff -u -r1.29.2.1 -r1.29.2.2 --- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 19 Nov 2003 00:58:16 -0000 1.29.2.1 +++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 24 Nov 2003 19:47:34 -0000 1.29.2.2 @@ -516,35 +516,39 @@ @return If successful, a path to the .info file of the package uncompressed into the apm-workspace directory -} { - apm_callback_and_log $callback "
[ad_footer]" - return - } +} { + # First download the apm file if a URL is provided + if { ![empty_string_p $url] } { + apm_callback_and_log $callback "[ad_quotehtml $errmsg] -
[ad_footer]" + return + } - if {![file exists $file_path]} { - apm_callback_and_log $callback " - The file cannot be found. Your URL or your file name is incorrect. Please verify that the file name - is correct and try again." - ns_log Error "Error loading APM file form url $url: The file cannot be found." - return + if {![file exists $file_path]} { + apm_callback_and_log $callback " + The file cannot be found. Your URL or your file name is incorrect. Please verify that the file name + is correct and try again." + ns_log Error "Error loading APM file form url $url: The file cannot be found." + return + } } + if { [catch { set files [split [string trim \ [exec [apm_gunzip_cmd] -q -c $file_path | [apm_tar_cmd] tf - 2>/dev/null] "\n"]][ad_quotehtml $errmsg] +