Skip to content

Commit

Permalink
Merge pull request #48 from Terradue/feature/ESACPE-1800
Browse files Browse the repository at this point in the history
ESACPE-1800 : NPE
  • Loading branch information
floeschau authored Mar 15, 2024
2 parents 0fe119d + b4f0a05 commit bb8b32b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Stars.Data/Model/Metadata/Bka/BkaMetadataExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,20 @@ protected override async Task<StacNode> ExtractMetadata(IItem item, string suffi
ZipArchiveAsset productZipArchiveAsset = new ZipArchiveAsset(productZipAsset, logger, resourceServiceProvider, _fileSystem);
var tmpDestination2 = LocalFileDestination.Create(_fileSystem.Directory.CreateDirectory(Path.GetDirectoryName(productZipArchiveAsset.Uri.AbsolutePath)), item, true);
IAssetsContainer productZipAssets = await productZipArchiveAsset.ExtractToDestinationAsync(tmpDestination2, _carrierManager, System.Threading.CancellationToken.None);

IEnumerable<IAsset> innerZipAssets = GetInnerZipAssets(productZipAssets);
if (innerZipAssets != null)
{
foreach (IAsset innerZipAsset in innerZipAssets)
if (productZipAssets != null) {
IEnumerable<IAsset> innerZipAssets = GetInnerZipAssets(productZipAssets);
if (innerZipAssets != null)
{
ZipArchiveAsset innerZipArchiveAsset = new ZipArchiveAsset(innerZipAsset, logger, resourceServiceProvider, _fileSystem);
var tmpDestination3 = LocalFileDestination.Create(_fileSystem.Directory.CreateDirectory(Path.GetDirectoryName(innerZipArchiveAsset.Uri.AbsolutePath)), item, true);
IAssetsContainer innerZipAssetContainer = await innerZipArchiveAsset.ExtractToDestinationAsync(tmpDestination3, _carrierManager, System.Threading.CancellationToken.None);
if (innerZipAssetContainers == null) innerZipAssetContainers = new List<IAssetsContainer>();
innerZipAssetContainers.Add(innerZipAssetContainer);
foreach (IAsset innerZipAsset in innerZipAssets)
{
ZipArchiveAsset innerZipArchiveAsset = new ZipArchiveAsset(innerZipAsset, logger, resourceServiceProvider, _fileSystem);
var tmpDestination3 = LocalFileDestination.Create(_fileSystem.Directory.CreateDirectory(Path.GetDirectoryName(innerZipArchiveAsset.Uri.AbsolutePath)), item, true);
IAssetsContainer innerZipAssetContainer = await innerZipArchiveAsset.ExtractToDestinationAsync(tmpDestination3, _carrierManager, System.Threading.CancellationToken.None);
if (innerZipAssetContainers == null) innerZipAssetContainers = new List<IAssetsContainer>();
innerZipAssetContainers.Add(innerZipAssetContainer);
}
}
}

}

}
Expand Down

0 comments on commit bb8b32b

Please sign in to comment.