aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-04-15 20:18:04 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-04-23 12:54:26 +0200
commitfb88aba8f4927b3175df34a2a499978a3b4c1b6b (patch)
treef05caeb3b23835730509102d5975312c425ec7a5 /apps/files_sharing
parentd468cdacf27acf1de78a7b2f07d21d1851aa8f39 (diff)
downloadnextcloud-server-fb88aba8f4927b3175df34a2a499978a3b4c1b6b.tar.gz
nextcloud-server-fb88aba8f4927b3175df34a2a499978a3b4c1b6b.zip
some fixes to make the gallery work, this made it necessary to adjust some tests and the encryption code
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/cache.php5
-rw-r--r--apps/files_sharing/tests/cache.php18
2 files changed, 11 insertions, 12 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 3d9fbcf4de9..4b473c60577 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -141,15 +141,14 @@ class Shared_Cache extends Cache {
$folder = '';
}
- $dir = 'files' . $this->storage->getMountPoint();
- $dir .= ($folder !== '') ? '/' . $folder : '';
+ $dir = ($folder !== '') ? $folder . '/' : '';
$cache = $this->getSourceCache($folder);
if ($cache) {
$parent = $this->storage->getFile($folder);
$sourceFolderContent = $cache->getFolderContents($this->files[$folder]);
foreach ($sourceFolderContent as $key => $c) {
- $sourceFolderContent[$key]['path'] = $dir . '/' . $c['name'];
+ $sourceFolderContent[$key]['path'] = $dir . $c['name'];
$sourceFolderContent[$key]['uid_owner'] = $parent['uid_owner'];
$sourceFolderContent[$key]['displayname_owner'] = $parent['uid_owner'];
}
diff --git a/apps/files_sharing/tests/cache.php b/apps/files_sharing/tests/cache.php
index b8ebeab3c39..1af73c558d5 100644
--- a/apps/files_sharing/tests/cache.php
+++ b/apps/files_sharing/tests/cache.php
@@ -100,15 +100,15 @@ class Test_Files_Sharing_Cache extends Test_Files_Sharing_Base {
$check = array(
array(
'name' => 'bar.txt',
- 'path' => 'files/shareddir/bar.txt'
+ 'path' => 'bar.txt'
),
array(
'name' => 'another too.txt',
- 'path' => 'files/shareddir/subdir/another too.txt'
+ 'path' => 'subdir/another too.txt'
),
array(
'name' => 'another.txt',
- 'path' => 'files/shareddir/subdir/another.txt'
+ 'path' => 'subdir/another.txt'
),
);
$this->verifyFiles($check, $results);
@@ -151,17 +151,17 @@ class Test_Files_Sharing_Cache extends Test_Files_Sharing_Base {
array(
array(
'name' => 'bar.txt',
- 'path' => 'files/shareddir/bar.txt',
+ 'path' => 'bar.txt',
'mimetype' => 'text/plain',
),
array(
'name' => 'emptydir',
- 'path' => 'files/shareddir/emptydir',
+ 'path' => 'emptydir',
'mimetype' => 'httpd/unix-directory',
),
array(
'name' => 'subdir',
- 'path' => 'files/shareddir/subdir',
+ 'path' => 'subdir',
'mimetype' => 'httpd/unix-directory',
),
),
@@ -185,17 +185,17 @@ class Test_Files_Sharing_Cache extends Test_Files_Sharing_Base {
array(
array(
'name' => 'another too.txt',
- 'path' => 'files/subdir/another too.txt',
+ 'path' => 'another too.txt',
'mimetype' => 'text/plain',
),
array(
'name' => 'another.txt',
- 'path' => 'files/subdir/another.txt',
+ 'path' => 'another.txt',
'mimetype' => 'text/plain',
),
array(
'name' => 'not a text file.xml',
- 'path' => 'files/subdir/not a text file.xml',
+ 'path' => 'not a text file.xml',
'mimetype' => 'application/xml',
),
),