#80692Deleting old files fails
Description
I cannot delete an old file, which once was referenced but isn’t anymore. I only see a warning like this:
> File not deleted
> The file cannot be deleted since it is still used at the following places: [record:…]
What I found out until now:
- records in “sys_file_references” exist, but are marked with “deleted=1”
- existing file references are checked against “sys_refindex” and not “sys_file_references”, before they can be deleted
- the reference index contains deleted records
Maybe the check before deleting a file should not check against the reference index, but check the real file references?