Commit 00f461ae authored by alexpott's avatar alexpott

Issue #2079315 by mondrake: Fixed Image style editing leads to redundant watchdog entries.

parent e0b1f83e
......@@ -255,7 +255,9 @@ public function flush($path = NULL) {
// Delete the style directory in each registered wrapper.
$wrappers = file_get_stream_wrappers(STREAM_WRAPPERS_WRITE_VISIBLE);
foreach ($wrappers as $wrapper => $wrapper_data) {
file_unmanaged_delete_recursive($wrapper . '://styles/' . $this->id());
if (file_exists($directory = $wrapper . '://styles/' . $this->id())) {
file_unmanaged_delete_recursive($directory);
}
}
// Let other modules update as necessary on flush.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment