Skip to content
Snippets Groups Projects
Commit 28f0e630 authored by Vincent Petry's avatar Vincent Petry
Browse files

Fix sharing of ext storage mount points

When sharing an ext storage mount point, it will now use the name of the
mount point instead of an empty string for the target path.
parent 254fa5eb
Branches
No related tags found
No related merge requests found
...@@ -33,10 +33,12 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { ...@@ -33,10 +33,12 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
private $path; private $path;
public function isValidSource($itemSource, $uidOwner) { public function isValidSource($itemSource, $uidOwner) {
$query = \OC_DB::prepare('SELECT `name` FROM `*PREFIX*filecache` WHERE `fileid` = ?'); $path = \OC\Files\Filesystem::getPath($itemSource);
$result = $query->execute(array($itemSource)); if ($path) {
if ($row = $result->fetchRow()) { // FIXME: attributes should not be set here,
$this->path = $row['name']; // keeping this pattern for now to avoid unexpected
// regressions
$this->path = basename($path);
return true; return true;
} }
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment