Skip to content

Commit 35d4886

Browse files
committed
Fixes Issue 39
1 parent 53f86cf commit 35d4886

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/Sabre/DAV/Server.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,12 +1029,11 @@ public function createFile($uri,$data) {
10291029
*/
10301030
public function createDirectory($uri) {
10311031

1032-
$parentUri = dirname($uri);
1033-
if ($parentUri=='.') $parentUri = '';
1032+
list($dir, $name) = Sabre_DAV_URLUtil::splitPath($uri);
10341033
if (!$this->broadcastEvent('beforeBind',array($uri))) return;
10351034

1036-
$parent = $this->tree->getNodeForPath($parentUri);
1037-
$parent->createDirectory(basename($uri));
1035+
$parent = $this->tree->getNodeForPath($dir);
1036+
$parent->createDirectory($name);
10381037

10391038
$this->broadcastEvent('afterBind',array($uri));
10401039

0 commit comments

Comments
 (0)