Skip to content
Commit 8c892d10 authored by Jeremy Felt's avatar Jeremy Felt
Browse files

Don't filter absolute paths when deleting an original file

The `wp_delete_file` filter  is used in two different ways. When
filtering the filename for the removal of thumbnails, extra image
sizes, and backup sizes, a relative path is expected in return. This
relative path is then used to rebuild the absolute path before
`unlink()` fires.

When filtering directly in `wp_delete_file()`, an absolute path is
expected at all times.

This fixes a case where original files would not be deleted from S3
when removed from the media library, but where all of the thumbnails
would be deleted.

See https://github.com/humanmade/S3-Uploads/issues/92
See https://core.trac.wordpress.org/ticket/39476
parent dbbd1c41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment