Index: openacs-4/packages/acs-api-browser/www/display-sql.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/display-sql.tcl,v diff -u -r1.4 -r1.4.10.1 --- openacs-4/packages/acs-api-browser/www/display-sql.tcl 10 Jan 2007 21:22:01 -0000 1.4 +++ openacs-4/packages/acs-api-browser/www/display-sql.tcl 15 Sep 2013 11:39:02 -0000 1.4.10.1 @@ -58,10 +58,14 @@ } if { $safe_p } { - if [catch { - set sql [ad_quotehtml [read [open "[acs_package_root_dir $package_key]/sql/$url"]]] - }] { - ad_return_error "Problem reading file" "There was a problem reading $url" + set sql "" + set fn [acs_package_root_dir $package_key]/sql/$url + if {[file exists $fn]} { + if {[catch { + set f [open $fn]; set sql [read $f]; close $f + } errorMsg]} { + ad_return_error "Problem reading file" "There was a problem reading $url ($errorMsg)" + } } } else { ad_return_error "Invalid file location" "Can only display files in package or doc directory"