summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/share
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-08 22:35:01 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-08 22:35:01 +0200
commit6e7c274d2ea70f7af5035c890aa39ea5096f7fd1 (patch)
tree106fef88a2b23626843b08b95ad3eb9b95060d45 /apps/files_sharing/lib/share
parent8ede209ea3ca4913f7d6d4447ff14439ab3cf1b7 (diff)
parent05dc694c5c113079306a351f16a422e514d4a1e8 (diff)
downloadnextcloud-server-6e7c274d2ea70f7af5035c890aa39ea5096f7fd1.tar.gz
nextcloud-server-6e7c274d2ea70f7af5035c890aa39ea5096f7fd1.zip
Merge pull request #8499 from owncloud/shareextstoragemountpointfix
Fix sharing of ext storage mount points
Diffstat (limited to 'apps/files_sharing/lib/share')
-rw-r--r--apps/files_sharing/lib/share/file.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php
index 2c59bd3bf92..9950b4d61fd 100644
--- a/apps/files_sharing/lib/share/file.php
+++ b/apps/files_sharing/lib/share/file.php
@@ -33,10 +33,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;