Skip to content

Commit

Permalink
Update checksums in NoopScanner - necessary to fix checksums on objec…
Browse files Browse the repository at this point in the history
…tstore
  • Loading branch information
DeepDiver1975 committed Apr 11, 2018
1 parent 92c4a89 commit cd8b359
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/private/Files/ObjectStore/NoopScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
class NoopScanner extends Scanner {

public function __construct(Storage $storage) {
$this->storage = $storage;
//we don't need the storage, so do nothing here
}

Expand All @@ -55,7 +56,16 @@ public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData =
* @return array with the meta data of the scanned file or folder
*/
public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) {
return [];
$meta = $this->storage->getMetaData($path);

if (isset($meta['checksum'])) {
$this->storage->getCache()->put(
$path,
['checksum' => $meta['checksum']]
);
}

return $meta;
}

/**
Expand Down

0 comments on commit cd8b359

Please sign in to comment.