fix (core.gbapp): Download folder on server azure.
This commit is contained in:
		
							parent
							
								
									b76c5ae227
								
							
						
					
					
						commit
						214a6472ef
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		| 
						 | 
					@ -500,11 +500,8 @@ export class GBDeployer implements IGBDeployer {
 | 
				
			||||||
        fs.mkdir(pathBase);
 | 
					        fs.mkdir(pathBase);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      let packagePath = GBUtil.getGBAIPath(min.botId);
 | 
					 | 
				
			||||||
      packagePath = urlJoin(packagePath, remotePath);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      await CollectionUtil.asyncForEach(parts, async item => {
 | 
					      await CollectionUtil.asyncForEach(parts, async item => {
 | 
				
			||||||
        pathBase = packagePath.join(pathBase, item);
 | 
					        pathBase = path.join(pathBase, item);
 | 
				
			||||||
        if (!(await GBUtil.exists(pathBase))) {
 | 
					        if (!(await GBUtil.exists(pathBase))) {
 | 
				
			||||||
          fs.mkdir(pathBase);
 | 
					          fs.mkdir(pathBase);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -512,6 +509,8 @@ export class GBDeployer implements IGBDeployer {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // Retrieves all files in remote folder.
 | 
					      // Retrieves all files in remote folder.
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
 | 
					      let packagePath = GBUtil.getGBAIPath(min.botId);
 | 
				
			||||||
 | 
					      packagePath = urlJoin(packagePath, remotePath);
 | 
				
			||||||
      let url = `${baseUrl}/drive/root:/${packagePath}:/children`;
 | 
					      let url = `${baseUrl}/drive/root:/${packagePath}:/children`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      GBLogEx.info(min, `Downloading: ${url}`);
 | 
					      GBLogEx.info(min, `Downloading: ${url}`);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue