mirror of
https://github.com/nextcloud/server.git
synced 2026-06-05 06:44:47 -04:00
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.
Backport of 28f0e63 from master
This commit is contained in:
parent
d2dbab21fb
commit
113cd404c0
1 changed files with 6 additions and 4 deletions
|
|
@ -31,10 +31,12 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
|
|||
private $path;
|
||||
|
||||
public function isValidSource($itemSource, $uidOwner) {
|
||||
$query = \OC_DB::prepare('SELECT `name` FROM `*PREFIX*filecache` WHERE `fileid` = ?');
|
||||
$result = $query->execute(array($itemSource));
|
||||
if ($row = $result->fetchRow()) {
|
||||
$this->path = $row['name'];
|
||||
$path = \OC\Files\Filesystem::getPath($itemSource);
|
||||
if ($path) {
|
||||
// FIXME: attributes should not be set here,
|
||||
// keeping this pattern for now to avoid unexpected
|
||||
// regressions
|
||||
$this->path = basename($path);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue