summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-24 14:24:56 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-24 14:24:56 +0200
commit88d1e20d561735ae4eccd6ebd40c1be70cbb8cf6 (patch)
treefcde0d00e0585115ec6003f112d96fef18c65c53 /lib
parent808e9b0f515585f8d2bb18de94eed994d14f3749 (diff)
downloadnextcloud-server-88d1e20d561735ae4eccd6ebd40c1be70cbb8cf6.tar.gz
nextcloud-server-88d1e20d561735ae4eccd6ebd40c1be70cbb8cf6.zip
some logging added ....
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/cache/scanner.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index f63abf2d4fc..bcf88da3670 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -62,8 +62,12 @@ class Scanner extends BasicEmitter {
* @return array with metadata of the file
*/
public function getData($path) {
+ if (!$this->storage->isReadable($path)) {
+ //cant read, nothing we can do
+ \OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! Path '$path' is not readable !!!", \OCP\Util::ERROR);
+ return null;
+ }
$data = array();
- if (!$this->storage->isReadable($path)) return null; //cant read, nothing we can do
$data['mimetype'] = $this->storage->getMimeType($path);
$data['mtime'] = $this->storage->filemtime($path);
if ($data['mimetype'] == 'httpd/unix-directory') {
@@ -104,7 +108,9 @@ class Scanner extends BasicEmitter {
$newData = $data;
$cacheData = $this->cache->get($file);
if ($cacheData) {
- $this->permissionsCache->remove($cacheData['fileid']);
+ if (isset($cacheData['fileid'])) {
+ $this->permissionsCache->remove($cacheData['fileid']);
+ }
if ($reuseExisting) {
// prevent empty etag
$etag = $cacheData['etag'];
@@ -137,6 +143,9 @@ class Scanner extends BasicEmitter {
}
// Only update metadata that has changed
$newData = array_diff($data, $cacheData);
+ if (isset($newData['etag'])) {
+ \OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! No reuse of etag for '$file' !!!", \OCP\Util::ERROR);
+ }
}
}
if (!empty($newData)) {