Merge pull request #12298 from nextcloud/backport/12127/stable13

[13] A folder should get a folder mimetype
This commit is contained in:
Morris Jobke 2018-11-06 18:13:45 +01:00 committed by GitHub
commit 1cac241318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -76,6 +76,11 @@ class FileMimeType extends AbstractStringCheck {
return $this->mimeType[$this->storage->getId()][$this->path];
}
if ($this->storage->is_dir($this->path)) {
$this->mimeType[$this->storage->getId()][$this->path] = 'httpd/unix-directory';
return $this->mimeType[$this->storage->getId()][$this->path];
}
if ($this->isWebDAVRequest()) {
// Creating a folder
if ($this->request->getMethod() === 'MKCOL') {