Index: openacs-4/packages/acs-content-repository/sql/oracle/content-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-create.sql,v
diff -u -r1.30 -r1.31
--- openacs-4/packages/acs-content-repository/sql/oracle/content-create.sql	27 Oct 2014 16:39:06 -0000	1.30
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-create.sql	7 Aug 2017 23:47:46 -0000	1.31
@@ -767,7 +767,7 @@
             from cr_items i
            where i.item_id = :old.item_id
              and i.storage_type = 'file'
-             and r.content is not null;
+             and :old.filename is not null;
 
 end cr_cleanup_cr_files_del_trg;
 /
