Rename
This commit is contained in:
		
							
								
								
									
										8
									
								
								lib.js
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								lib.js
									
									
									
									
									
								
							@@ -611,15 +611,15 @@ export const downloadImage = async (url, basename, source, view) => {
 | 
				
			|||||||
      return url
 | 
					      return url
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let relativePath = Path.join(view.imageStoreDirectory, basename + extension)
 | 
					    let pathname = Path.join(view.imageStoreDirectory, basename + extension)
 | 
				
			||||||
    let path = Path.join(view.path, relativePath)
 | 
					    let path = Path.join(view.path, pathname)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const download = () => write(path, response.body)
 | 
					    const download = () => write(path, response.body)
 | 
				
			||||||
      .then(annotate( `Downloaded ${relativePath}`))
 | 
					      .then(annotate( `Downloaded ${pathname}`))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // TODO: See if the image is downloaded before even trying to download it
 | 
					    // TODO: See if the image is downloaded before even trying to download it
 | 
				
			||||||
    view.batch.add(FS.access(path).catch(download))
 | 
					    view.batch.add(FS.access(path).catch(download))
 | 
				
			||||||
    return relativePath
 | 
					    return pathname
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    console.error( createNetworkingError(response) )
 | 
					    console.error( createNetworkingError(response) )
 | 
				
			||||||
    return url
 | 
					    return url
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user