fix(kb.gbapp): Download only if not in cache optimization.

This commit is contained in:
rodrigorodriguez 2023-02-26 06:48:47 -03:00
parent 68de407d63
commit b30e0160c4

View file

@ -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);