Skip to content

Commit

Permalink
Update AssetMigrationTracker.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
ningl2 authored and duggaraju committed Sep 10, 2024
1 parent ac76104 commit c609e24
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions migrationTool/ams/AssetMigrationTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ public async Task<AssetMigrationResult> GetMigrationStatusAsync(BlobContainerCli
}

metadataList.TryGetValue(AssetTypeKey, out assetType);

metadataList.TryGetValue(ManifestNameKey, out manifestName);

if (!string.IsNullOrEmpty(manifestName))
{
manifestName = Uri.UnescapeDataString(manifestName);
}

if (metadataList.TryGetValue(OutputPathKey, out value) && !string.IsNullOrEmpty(value))
{
outputPath = new Uri(Uri.UnescapeDataString(value), UriKind.Absolute);
outputPath = new Uri(value, UriKind.Absolute);
}
}

Expand Down Expand Up @@ -126,12 +130,12 @@ public async Task UpdateMigrationStatus(BlobContainerClient container, AssetMigr

if (!string.IsNullOrEmpty(result.ManifestName))
{
metadata.Add(ManifestNameKey, result.ManifestName);
metadata.Add(ManifestNameKey, Uri.EscapeDataString(result.ManifestName));
}

if (result.OutputPath != null && !string.IsNullOrEmpty(result.OutputPath.AbsoluteUri))
if (result.OutputPath != null)
{
metadata.Add(OutputPathKey, Uri.EscapeDataString(result.OutputPath.AbsoluteUri));
metadata.Add(OutputPathKey, result.OutputPath.AbsoluteUri);
}

await container.SetMetadataAsync(metadata, cancellationToken: cancellationToken);
Expand Down

0 comments on commit c609e24

Please sign in to comment.