summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-24 10:55:10 +0100
committerGitHub <noreply@github.com>2017-03-24 10:55:10 +0100
commit35d3a082f2a7256c104894faf6820a1410a0a38e (patch)
tree05fd63a372bbccb6a5792595edcb0a49e5d24640 /apps/workflowengine
parente5f9675a79abd9266380846809eb65a311bfd6d4 (diff)
parent394a61f1e62d143addcec44ce9479994f8fbc587 (diff)
downloadnextcloud-server-35d3a082f2a7256c104894faf6820a1410a0a38e.tar.gz
nextcloud-server-35d3a082f2a7256c104894faf6820a1410a0a38e.zip
Merge pull request #4010 from nextcloud/fac-58-mimetype-on-creating-directories
Fix workflow engine mimetype detection when creating a directory
Diffstat (limited to 'apps/workflowengine')
-rw-r--r--apps/workflowengine/lib/Check/FileMimeType.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php
index 8608fffd4e2..fe4a83bb906 100644
--- a/apps/workflowengine/lib/Check/FileMimeType.php
+++ b/apps/workflowengine/lib/Check/FileMimeType.php
@@ -77,6 +77,12 @@ class FileMimeType extends AbstractStringCheck {
}
if ($this->isWebDAVRequest()) {
+ // Creating a folder
+ if ($this->request->getMethod() === 'MKCOL') {
+ $this->mimeType[$this->storage->getId()][$this->path] = 'httpd/unix-directory';
+ return $this->mimeType[$this->storage->getId()][$this->path];
+ }
+
if ($this->request->getMethod() === 'PUT') {
$path = $this->request->getPathInfo();
$this->mimeType[$this->storage->getId()][$this->path] = $this->mimeTypeDetector->detectPath($path);