Fix the size calculation to prefer the shared version if both are available.
This commit is contained in:
		
							parent
							
								
									eb69588270
								
							
						
					
					
						commit
						4b13ddc118
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -307,7 +307,7 @@ def get_image_json(namespace, repository, image_id, headers): | |||
| 
 | ||||
|   profile.debug('Looking up repo layer size') | ||||
|   try: | ||||
|     size = repo_image.image_size or repo_image.storage.image_size | ||||
|     size = (repo_image.storage and repo_image.storage.image_size) or repo_image.image_size | ||||
|     headers['X-Docker-Size'] = str(size) | ||||
|   except OSError: | ||||
|     pass | ||||
|  |  | |||
		Reference in a new issue