summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRello <Rello@users.noreply.github.com>2017-04-18 21:41:52 +0200
committerJoas Schilling <coding@schilljs.com>2017-05-11 10:40:48 +0200
commitf1ef5fc5379f9acad16f412648ff44e9266805c1 (patch)
tree9a72bdccb0aa981493e90c4dc9178d924129d066
parent241226c23c3333c6ad8759df486a8bbc107d6a68 (diff)
downloadnextcloud-server-f1ef5fc5379f9acad16f412648ff44e9266805c1.tar.gz
nextcloud-server-f1ef5fc5379f9acad16f412648ff44e9266805c1.zip
don´t change folders with --repair-filecache
check if folder is "httpd/unix-directory" and don´t perform here #27585
-rw-r--r--lib/private/Files/Type/Loader.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Type/Loader.php b/lib/private/Files/Type/Loader.php
index 4dd798e7b07..bc3c2f1c9e6 100644
--- a/lib/private/Files/Type/Loader.php
+++ b/lib/private/Files/Type/Loader.php
@@ -158,12 +158,16 @@ class Loader implements IMimeTypeLoader {
* @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)
));