Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.368.2.102 -r1.368.2.103 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 25 Dec 2021 16:10:23 -0000 1.368.2.102 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 29 Dec 2021 15:38:23 -0000 1.368.2.103 @@ -742,6 +742,17 @@ } set full_file_name [:full_file_name] + + if {![ad_file exists $full_file_name]} { + # This should not happen on a production system, however it + # might on a test system that does not have a copy of the + # content-repository folder. We fail more gracefully in this + # case. + ad_log warning "::xowiki::File www-download: '$full_file_name' does not exist on the filesystem, returning 404" + ns_returnnotfound + ad_script_abort + } + #:log "--F FILE=$full_file_name // ${:mime_type}" set geometry [::xo::cc query_parameter geometry ""]