]> source.dussan.org Git - nextcloud-server.git/commitdiff
return 403 when mkdir failed on webDAV, fixes #2127
authorArthur Schiwon <blizzz@owncloud.com>
Wed, 6 Mar 2013 14:21:12 +0000 (15:21 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Wed, 6 Mar 2013 14:21:12 +0000 (15:21 +0100)
lib/connector/sabre/directory.php

index 953692f80a999829ea678f07c0beef1be5240f22..6ccb54b79abe564ba18d3694c8b87b04de4b1d1c 100644 (file)
@@ -107,7 +107,9 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
        public function createDirectory($name) {
 
                $newPath = $this->path . '/' . $name;
-               \OC\Files\Filesystem::mkdir($newPath);
+               if(!\OC\Files\Filesystem::mkdir($newPath)) {
+                       throw new Sabre_DAV_Exception_Forbidden('Could not create directory '.$newPath);
+               }
 
        }