Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.239.2.35 -r1.239.2.36 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 22 Apr 2015 06:44:43 -0000 1.239.2.35 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 27 Apr 2015 14:40:37 -0000 1.239.2.36 @@ -778,7 +778,13 @@ link_label } file instproc check=virus {value} { - if {[my viruscheck] && $value ne "" && [::xowiki::virus check [my set tmpfile]]} { + set tmpfile [my set tmpfile] + # In case of an upgrade script, the (uploaded) tmp file might not exist + if {[my viruscheck] + && $value ne "" + && [file exists $tmpfile] + && [::xowiki::virus check $tmpfile] + } { #util_user_message -message "uploaded file contains a virus; upload rejected" return 0 }