Skip to content
Snippets Groups Projects
Commit b02b6d3c authored by Björn Schießle's avatar Björn Schießle
Browse files

no exception for the root of the mount point (formerly Shared/), just get the...

no exception for the root of the mount point (formerly Shared/), just get the file cache information from the cache
parent c377893f
No related branches found
No related tags found
No related merge requests found
......@@ -84,16 +84,7 @@ class Shared_Cache extends Cache {
* @return array
*/
public function get($file) {
if ($file == '') {
$data = \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_FILE_APP_ROOT);
$etag = \OCP\Config::getUserValue(\OCP\User::getUser(), 'files_sharing', 'etag');
if (!isset($etag)) {
$etag = $this->storage->getETag('');
\OCP\Config::setUserValue(\OCP\User::getUser(), 'files_sharing', 'etag', $etag);
}
$data['etag'] = $etag;
return $data;
} else if (is_string($file)) {
if (is_string($file)) {
if ($cache = $this->getSourceCache($file)) {
return $cache->get($this->files[$file]);
}
......
......@@ -109,22 +109,6 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
$files[] = $file;
}
return $files;
} else if ($format == self::FORMAT_FILE_APP_ROOT) {
$mtime = 0;
$size = 0;
foreach ($items as $item) {
if ($item['mtime'] > $mtime) {
$mtime = $item['mtime'];
}
$size += (int)$item['size'];
}
return array(
'fileid' => -1,
'name' => 'Shared',
'mtime' => $mtime,
'mimetype' => 'httpd/unix-directory',
'size' => $size
);
} else if ($format == self::FORMAT_OPENDIR) {
$files = array();
foreach ($items as $item) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment