Skip to content

Commit

Permalink
fix(kb.gbapp): Download only if not in cache optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Feb 26, 2023
1 parent 68de407 commit b30e016
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core.gbapp/services/GBDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,13 @@ export class GBDeployer implements IGBDeployer {

if (Fs.existsSync(itemPath)) {
const dt = Fs.statSync(itemPath);
if (new Date(dt.mtime) > new Date(item.lastModifiedDateTime)) {
if (new Date(dt.mtime) >= new Date(item.lastModifiedDateTime)) {
download = false;
}
}

if (download) {
GBLog.info(`Downloading ${itemPath}...`);
GBLog.verbose(`Downloading ${itemPath}...`);
const url = item['@microsoft.graph.downloadUrl'];

const response = await fetch(url);
Expand Down

0 comments on commit b30e016

Please sign in to comment.