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 authored and IljaN committed Apr 11, 2018
1 parent 82abf80 commit 3f905a6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 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,6 +56,15 @@ 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) {
// we only update the checksums - still returning no data
$meta = $this->storage->getMetaData($path);
if (isset($meta['checksum'])) {
$this->storage->getCache()->put(
$path,
['checksum' => $meta['checksum']]
);
}

return [];
}

Expand Down

0 comments on commit 3f905a6

Please sign in to comment.