summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/files/cache/scanner.php15
-rw-r--r--lib/mail.php2
2 files changed, 10 insertions, 7 deletions
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index 46122221dc2..8f9a7921956 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -78,18 +78,21 @@ class Scanner {
$this->scanFile($parent);
}
}
- if($cacheData = $this->cache->get($file)) {
+ $newData = $data;
+ if ($cacheData = $this->cache->get($file)) {
+ if ($checkExisting && $data['size'] === -1) {
+ $data['size'] = $cacheData['size'];
+ }
if ($data['mtime'] === $cacheData['mtime'] &&
$data['size'] === $cacheData['size']) {
$data['etag'] = $cacheData['etag'];
}
+ // Only update metadata that has changed
+ $newData = array_diff($data, $cacheData);
}
- if ($checkExisting and $cacheData) {
- if ($data['size'] === -1) {
- $data['size'] = $cacheData['size'];
- }
+ if (!empty($newData)) {
+ $this->cache->put($file, $newData);
}
- $this->cache->put($file, $data);
}
return $data;
}
diff --git a/lib/mail.php b/lib/mail.php
index 61634632efc..e15af277a64 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -113,7 +113,7 @@ class OC_Mail {
*/
public static function getfooter() {
- $txt="\n--\n";
+ $txt="\n-- \n";
$txt.="ownCloud\n";
$txt.="Your Cloud, Your Data, Your Way!\n";
return($txt);