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:
Robin Appelman 2017-08-25 14:51:57 +02:00 committed by Morris Jobke
parent 2bf15eda26
commit 18908af87b
No known key found for this signature in database
GPG key ID: FE03C3A163FEDE68

View file

@ -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
}