mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-04 23:44:33 +02:00
Fixed the file deleting mechanism when changing/deleting attachments.
Also the file is also delted from thumbnail cache.
This commit is contained in:
parent
d859d8533d
commit
650ad4b578
2 changed files with 16 additions and 3 deletions
|
@ -90,7 +90,7 @@ class AttachmentDeleteListener
|
|||
public function postRemoveHandler(Attachment $attachment, LifecycleEventArgs $event)
|
||||
{
|
||||
//Dont delete file if the attachment uses a builtin ressource:
|
||||
if (Attachment::checkIfBuiltin($event->getOldValue('path'))) {
|
||||
if ($attachment->isBuiltIn()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue