I think as a result of #1083982-36: Fix support for remote streamwrappers, if you add a remote file to Media (e.g., via the media_youtube or oembed projects), and that module implements a stream wrapper that extends MediaReadOnlyStreamWrapper, then calls to file_delete() fail with a "The file ... was not deleted due to an error." message. While this can be fixed by each provider module, as in #1235852-8: The file was not deleted due to an error, here's a fix in the base class itself.

This patch is rolled against 1.x, but I'm putting the issue in 2.x first, in case the same or similar fix is needed there.

CommentFileSizeAuthor
media-streamwrapper.patch14.41 KBeffulgentsia

Comments

TimelessDomain’s picture

Thanks effulgentsia! It works for me.

amsukalski’s picture

It worked for me as well. Thanks a lot!

rwohleb’s picture

subscribe

afsolano’s picture

subscribe

Status: Needs review » Needs work

The last submitted patch, media-streamwrapper.patch, failed testing.

Leeteq’s picture

Having 1.x-RC1 released, should this be committed against that branch first?

effulgentsia’s picture

Status: Needs work » Fixed

The original patch failed to apply because it includes a large hunk to clean up a legacy 1.x file that has already been removed from 2.x. So, committed the remaining hunk to 2.x, and the original patch to 1.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.