Skip to content

Commit

Permalink
Fix the scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
AlttiRi committed Feb 6, 2022
1 parent 7249e48 commit 74bbade
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scanner/scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ for await (const /** @type {ListEntry} */ listEntry of listFiles({
scanObject.add(scanEntry);

handled++;
size += scanEntry.statsInfo?.stats.size || 0;
size += scanEntry.statsInfo?.stats?.size || 0;
}
clearInterval(timerId);
process.stdout.write(`\rProcessed: ${ANSI_CYAN(handled)} items, total size: ${ANSI_CYAN(bytesToSizeWinLike(size))} (${ANSI_CYAN(size)})\n`);
Expand Down Expand Up @@ -163,8 +163,8 @@ function typeFromDirent(dirent) {

/**
* @typedef {ScanEntryBase} ScanEntry
* @property {ScanStatsInfo} statsInfo
* @property {ScanSymlinkInfo} linkInfo
* @property {ScanStatsInfo} [statsInfo]
* @property {ScanSymlinkInfo} [linkInfo]
**/

/** @param {ScanEntryBase} entry
Expand Down

0 comments on commit 74bbade

Please sign in to comment.