mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Dont swallow exception when inserting mimetypes if we're inside a transaction
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
2bf15eda26
commit
18908af87b
1 changed files with 4 additions and 0 deletions
|
|
@ -119,6 +119,10 @@ class Loader implements IMimeTypeLoader {
|
|||
]);
|
||||
$qb->execute();
|
||||
} catch (UniqueConstraintViolationException $e) {
|
||||
if ($this->dbConnection->inTransaction()) {
|
||||
// if we're inside a transaction we can't recover safely
|
||||
throw $e;
|
||||
}
|
||||
// something inserted it before us
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue