]> source.dussan.org Git - nextcloud-server.git/commitdiff
Cache: also preserve etags for files
authorRobin Appelman <icewind@owncloud.com>
Tue, 12 Feb 2013 13:56:57 +0000 (14:56 +0100)
committerRobin Appelman <icewind@owncloud.com>
Tue, 12 Feb 2013 13:56:57 +0000 (14:56 +0100)
lib/files/cache/scanner.php

index 7f19261d972761d870d8b18b2783b735892adc4d..70266c26e68d3d4873ba09960619fc9408db7ecc 100644 (file)
@@ -74,8 +74,11 @@ class Scanner {
                                        $this->scanFile($parent);
                                }
                        }
-                       if ($checkExisting and $data['size'] === -1 and $cacheData = $this->cache->get($file)) {
-                               $data['size'] = $cacheData['size'];
+                       if ($checkExisting) {
+                               $cacheData = $this->cache->get($file)
+                               if ($data['size'] === -1) {
+                                       $data['size'] = $cacheData['size'];
+                               }
                                if ($data['mtime'] === $cacheData['mtime']) {
                                        $data['etag'] = $cacheData['etag'];
                                }