aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/sharedstorage.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-03-07 17:14:34 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2013-03-07 17:14:34 -0500
commit48265643446f71abc1bf903ae822c746d5938865 (patch)
tree8a66504c8dd0997a9cc8aa7631eea834667ee20a /apps/files_sharing/lib/sharedstorage.php
parent4cb5cb9693a2b5d13905079f2ba7c6300c26d9b2 (diff)
parent0aa6c1b163c582011f695510b0048e31479eb8a4 (diff)
downloadnextcloud-server-48265643446f71abc1bf903ae822c746d5938865.tar.gz
nextcloud-server-48265643446f71abc1bf903ae822c746d5938865.zip
Merge branch 'master' into shared-folder-etags
Conflicts: apps/files_sharing/lib/sharedstorage.php
Diffstat (limited to 'apps/files_sharing/lib/sharedstorage.php')
-rw-r--r--apps/files_sharing/lib/sharedstorage.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index f1a371b1238..ffd4e5ced22 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -49,15 +49,12 @@ class Shared extends \OC\Files\Storage\Common {
if (pathinfo($target, PATHINFO_EXTENSION) === 'part') {
$source = \OC_Share_Backend_File::getSource(substr($target, 0, -5));
if ($source) {
- $source['path'] = '/'.$source['uid_owner'].'/'.$source['path'].'.part';
+ $source['path'] .= '.part';
// All partial files have delete permission
$source['permissions'] |= \OCP\PERMISSION_DELETE;
}
} else {
$source = \OC_Share_Backend_File::getSource($target);
- if ($source) {
- $source['path'] = '/'.$source['uid_owner'].'/'.$source['path'];
- }
}
$this->files[$target] = $source;
}
@@ -72,8 +69,16 @@ class Shared extends \OC\Files\Storage\Common {
private function getSourcePath($target) {
$source = $this->getFile($target);
if ($source) {
- \OC\Files\Filesystem::initMountPoints($source['uid_owner']);
- return $source['path'];
+ if (!isset($source['fullPath'])) {
+ \OC\Files\Filesystem::initMountPoints($source['fileOwner']);
+ $mount = \OC\Files\Mount::findByNumericId($source['storage']);
+ if ($mount) {
+ $this->files[$target]['fullPath'] = $mount->getMountPoint().$source['path'];
+ } else {
+ $this->files[$target]['fullPath'] = false;
+ }
+ }
+ return $this->files[$target]['fullPath'];
}
return false;
}
@@ -449,7 +454,7 @@ class Shared extends \OC\Files\Storage\Common {
}
$source = $this->getFile($path);
if ($source) {
- return $source['uid_owner'];
+ return $source['fileOwner'];
}
return false;
}