]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix workflow engine mimetype detection when creating a directory 4010/head
authorJoas Schilling <coding@schilljs.com>
Thu, 23 Mar 2017 11:45:36 +0000 (12:45 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 23 Mar 2017 11:45:36 +0000 (12:45 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/workflowengine/lib/Check/FileMimeType.php

index 8608fffd4e2b2904f8d507d94fa51fbbe7891529..fe4a83bb906635135cfd27fca99ab8665e7fb431 100644 (file)
@@ -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);