diff options
author | Rello <Rello@users.noreply.github.com> | 2017-04-18 21:41:52 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-05-11 10:40:48 +0200 |
commit | f1ef5fc5379f9acad16f412648ff44e9266805c1 (patch) | |
tree | 9a72bdccb0aa981493e90c4dc9178d924129d066 | |
parent | 241226c23c3333c6ad8759df486a8bbc107d6a68 (diff) | |
download | nextcloud-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.php | 4 |
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) )); |