[ticket/17361] Remove temp files always

PHPBB-17361
This commit is contained in:
Ruben Calvo 2024-11-29 21:43:58 +01:00
parent 9bf9538dc6
commit be3966c0cb
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View file

@ -132,7 +132,9 @@ class delete extends \phpbb\console\command\command
}
$progress->setMessage($this->language->lang('CLI_THUMBNAIL_DELETED', $row['real_filename'], $row['physical_filename']));
} catch (storage_exception $e) {
}
catch (storage_exception $e)
{
$return = symfony_command::FAILURE;
$progress->setMessage('<error>' . $this->language->lang('CLI_THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . '</error>');

View file

@ -156,9 +156,6 @@ class generate extends \phpbb\console\command\command
{
$this->storage->write('thumb_' . $row['physical_filename'], fopen($destination, 'rb'));
@unlink($source);
@unlink($destination);
$thumbnail_created[] = (int) $row['attach_id'];
if (count($thumbnail_created) === 250)
@ -173,6 +170,9 @@ class generate extends \phpbb\console\command\command
{
$progress->setMessage('<info>' . $this->language->lang('CLI_THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . '</info>');
}
@unlink($source);
@unlink($destination);
}
$progress->advance();