Index: openacs-4/packages/acs-content-repository/tcl/acs-content-repository-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/acs-content-repository-procs.tcl,v diff -u -N -r1.7.2.5 -r1.7.2.6 --- openacs-4/packages/acs-content-repository/tcl/acs-content-repository-procs.tcl 9 May 2014 08:25:45 -0000 1.7.2.5 +++ openacs-4/packages/acs-content-repository/tcl/acs-content-repository-procs.tcl 11 May 2014 18:25:54 -0000 1.7.2.6 @@ -27,14 +27,13 @@ db_transaction { # subselect makes sure there isn't a parent revision still lying around db_foreach fetch_paths { *SQL* } { - set file [cr_fs_path $storage_area_key]/$path - if {$path eq ""} { - ns_log Warning "cr_delete_scheduled_files: refuse to delete $file" - } else { - # remove the file from filesystem + if {[regexp {^[0-9/]+$} $path]} { + # the filename looks valid, delete the file from filesystem ns_log Debug "cr_delete_scheduled_files: deleting $file" file delete $file + } else { + ns_log Warning "cr_delete_scheduled_files: refuse to delete $file" } } # now that all scheduled files deleted, clear table