allow user to delete shared files/folders

This commit is contained in:
Bjoern Schiessle 2014-04-11 11:40:14 +02:00
parent d4085d8148
commit dfb69e9418
1 changed files with 2 additions and 1 deletions

View File

@ -348,7 +348,8 @@ class View {
$postFix = (substr($path, -1, 1) === '/') ? '/' : '';
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
list($storage, $internalPath) = Filesystem::resolvePath($absolutePath . $postFix);
if (!$internalPath || $internalPath === '' || $internalPath === '/') {
if (!($storage instanceof \OC\Files\Storage\Shared) &&
(!$internalPath || $internalPath === '' || $internalPath === '/')) {
// do not allow deleting the storage's root / the mount point
// because for some storages it might delete the whole contents
// but isn't supposed to work that way