fix(kb.gbapp): Download only if not in cache optimization.
This commit is contained in:
		
							parent
							
								
									68de407d63
								
							
						
					
					
						commit
						b30e0160c4
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue