diff --git a/lib/repair/repairmimetypes.php b/lib/repair/repairmimetypes.php
index ad55c63c21a7e95f41e339060939797a1c6bf18c..721464f923d3462fa5842ef202c6236d56beeb29 100644
--- a/lib/repair/repairmimetypes.php
+++ b/lib/repair/repairmimetypes.php
@@ -66,7 +66,7 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep {
 				SELECT `id`
 				FROM `*PREFIX*mimetypes`
 				WHERE `mimetype` = ?
-			) WHERE `name` LIKE ?
+			) WHERE `name` ILIKE ?
 		');
 	}
 	
diff --git a/tests/lib/repair/repairmimetypes.php b/tests/lib/repair/repairmimetypes.php
index 839a4723ecd7939bbe9d44dd830990bb7646aa0d..f9f214370cc4fccb5e81520adc2ad8b0c7b0507a 100644
--- a/tests/lib/repair/repairmimetypes.php
+++ b/tests/lib/repair/repairmimetypes.php
@@ -192,7 +192,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
 	}
 
 	/**
-	 * Test renaming the postscript mime types
+	 * Test renaming the Raw mime types
 	 */
 	public function testRenameRawMimeType() {
 		$this->addEntries(
@@ -214,6 +214,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
 				array('test.srf', 'application/octet-stream'),
 				array('test.sr2', 'application/octet-stream'),
 				array('test.xrf', 'application/octet-stream'),
+				array('CapitalExtension.DNG', 'application/octet-stream'),
 			)
 		);
 
@@ -242,6 +243,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
 				array('test.srf', 'image/x-dcraw'),
 				array('test.sr2', 'image/x-dcraw'),
 				array('test.xrf', 'image/x-dcraw'),
+				array('CapitalExtension.DNG', 'image/x-dcraw'),
 			)
 		);
 	}
@@ -373,6 +375,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
 				array('test.srf', 'image/x-dcraw'),
 				array('test.sr2', 'image/x-dcraw'),
 				array('test.xrf', 'image/x-dcraw'),
+				array('test.DNG', 'image/x-dcraw'),
 			)
 		);
 
@@ -413,6 +416,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
 				array('test.srf', 'image/x-dcraw'),
 				array('test.sr2', 'image/x-dcraw'),
 				array('test.xrf', 'image/x-dcraw'),
+				array('test.DNG', 'image/x-dcraw'),
 			)
 		);
 	}