Merge pull request #12907 from owncloud/delete-invalid-external-share

Fix deleting invalid s2s shares
This commit is contained in:
Robin Appelman 2014-12-18 16:38:13 +01:00
commit 1ef01de402
2 changed files with 13 additions and 0 deletions

View File

@ -167,6 +167,14 @@ class Storage extends DAV implements ISharedStorage {
}
}
public function file_exists($path) {
if ($path === '') {
return true;
} else {
return parent::file_exists($path);
}
}
/**
* check if the configured remote is a valid ownCloud instance
*

View File

@ -280,6 +280,11 @@ class View {
}
public function isDeletable($path) {
$absolutePath = $this->getAbsolutePath($path);
$mount = Filesystem::getMountManager()->find($absolutePath);
if ($mount->getInternalPath($absolutePath) === '') {
return $mount instanceof MoveableMount;
}
return $this->basicOperation('isDeletable', $path);
}