From 6e25f475dc998de3d1865fada704367df6b0c8c6 Mon Sep 17 00:00:00 2001 From: Rello Date: Tue, 18 Apr 2017 21:41:52 +0200 Subject: [PATCH] =?UTF-8?q?don=C2=B4t=20change=20folders=20with=20--repair?= =?UTF-8?q?-filecache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit check if folder is "httpd/unix-directory" and donĀ“t perform here #27585 --- lib/private/Files/Type/Loader.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Files/Type/Loader.php b/lib/private/Files/Type/Loader.php index 86bc5e1828fe..b81c2c9a83aa 100644 --- a/lib/private/Files/Type/Loader.php +++ b/lib/private/Files/Type/Loader.php @@ -158,12 +158,16 @@ private function loadMimetypes() { * @return int number of changed rows */ public function updateFilecache($ext, $mimetypeId) { + $is_folderId = $this->getId('httpd/unix-directory'); $update = $this->dbConnection->getQueryBuilder(); $update->update('filecache') ->set('mimetype', $update->createNamedParameter($mimetypeId)) ->where($update->expr()->neq( 'mimetype', $update->createNamedParameter($mimetypeId) )) + ->andwhere($update->expr()->neq( + 'mimetype', $update->createNamedParameter($is_folderId) + )) ->andWhere($update->expr()->like( $update->createFunction('LOWER(`name`)'), $update->createNamedParameter($ext) ));