diff options
Diffstat (limited to 'apps/files/ajax/newfolder.php')
-rw-r--r-- | apps/files/ajax/newfolder.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files/ajax/newfolder.php b/apps/files/ajax/newfolder.php index 34c2d0ca145..0f1f2f14eb0 100644 --- a/apps/files/ajax/newfolder.php +++ b/apps/files/ajax/newfolder.php @@ -20,7 +20,13 @@ if(strpos($foldername, '/')!==false) { } if(OC_Files::newFile($dir, stripslashes($foldername), 'dir')) { - OCP\JSON::success(array("data" => array())); + if ( $dir != '/') { + $path = $dir.'/'.$foldername; + } else { + $path = '/'.$foldername; + } + $id = OC_FileCache::getId($path); + OCP\JSON::success(array("data" => array('id'=>$id))); exit(); } |