Don't update the mtime if the storage mtime hasn't changed

This commit is contained in:
Robin Appelman 2014-06-05 10:08:25 +02:00
parent b5f0a17918
commit 3e73251750
1 changed files with 1 additions and 0 deletions

View File

@ -129,6 +129,7 @@ class Scanner extends BasicEmitter {
} }
// only reuse data if the file hasn't explicitly changed // only reuse data if the file hasn't explicitly changed
if (isset($data['storage_mtime']) && isset($cacheData['storage_mtime']) && $data['storage_mtime'] === $cacheData['storage_mtime']) { if (isset($data['storage_mtime']) && isset($cacheData['storage_mtime']) && $data['storage_mtime'] === $cacheData['storage_mtime']) {
$data['mtime'] = $cacheData['mtime'];
if (($reuseExisting & self::REUSE_SIZE) && ($data['size'] === -1)) { if (($reuseExisting & self::REUSE_SIZE) && ($data['size'] === -1)) {
$data['size'] = $cacheData['size']; $data['size'] = $cacheData['size'];
} }