Skip to content

Commit

Permalink
#91
Browse files Browse the repository at this point in the history
  • Loading branch information
KSemenenko committed Jun 14, 2024
1 parent f8d5117 commit 16e6353
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<RepositoryUrl>https://github.com/managedcode/Storage</RepositoryUrl>
<PackageProjectUrl>https://github.com/managedcode/Storage</PackageProjectUrl>
<Product>Managed Code - Storage</Product>
<Version>2.1.18</Version>
<PackageVersion>2.1.18</PackageVersion>
<Version>2.1.19</Version>
<PackageVersion>2.1.19</PackageVersion>

</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion ManagedCode.Storage.Core/ManagedCode.Storage.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ManagedCode.Communication" Version="8.0.2" />
<PackageReference Include="ManagedCode.Communication" Version="8.0.3" />
<PackageReference Include="ManagedCode.MimeTypes" Version="1.0.0"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ManagedCode.Communication" Version="8.0.2" />
<PackageReference Include="ManagedCode.Communication" Version="8.0.3" />
<PackageReference Include="AWSSDK.S3" Version="3.7.309.4" />
<PackageReference Include="Humanizer.Core" Version="2.14.1"/>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.18.0"/>
<PackageReference Include="ManagedCode.Communication" Version="8.0.2" />
<PackageReference Include="ManagedCode.Communication" Version="8.0.3" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.20.0"/>
<PackageReference Include="Humanizer.Core" Version="2.14.1"/>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1"/>
Expand Down
24 changes: 12 additions & 12 deletions Storages/ManagedCode.Storage.Azure/AzureStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,29 +148,29 @@ protected override async Task<Result> CreateContainerInternalAsync(CancellationT
{
if (StorageOptions.CreateContainerIfNotExists)
{
_ = await StorageClient.CreateIfNotExistsAsync(cancellationToken: cancellationToken);
var blobInfo = await StorageClient.CreateIfNotExistsAsync(cancellationToken: cancellationToken);
var policy = await StorageClient.GetAccessPolicyAsync(cancellationToken: cancellationToken);
if (policy.Value.BlobPublicAccess != StorageOptions.PublicAccessType)
await StorageClient.SetAccessPolicyAsync(StorageOptions.PublicAccessType, cancellationToken: cancellationToken);
}

try
{
IsContainerCreated = await StorageClient.ExistsAsync(cancellationToken);
}
catch (RequestFailedException e)
else
{
logger.LogException(e);
//probably we don't have permission to check if container exists
IsContainerCreated = true;
try
{
IsContainerCreated = await StorageClient.ExistsAsync(cancellationToken);
return Result.From(IsContainerCreated);
}
catch (RequestFailedException e)
{
//probably we don't have permission to check if container exists
logger.LogException(e);
}
}


return Result.Succeed();
}
catch (Exception ex)
{
IsContainerCreated = false;
logger.LogException(ex);
return Result.Fail(ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.11.4" />
<PackageReference Include="ManagedCode.Communication" Version="8.0.2" />
<PackageReference Include="ManagedCode.Communication" Version="8.0.3" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.20.0"/>
<PackageReference Include="Humanizer.Core" Version="2.14.1"/>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ManagedCode.Communication" Version="8.0.2" />
<PackageReference Include="ManagedCode.Communication" Version="8.0.3" />
<PackageReference Include="ManagedCode.MimeTypes" Version="1.0.0"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageReference Include="Google.Api.Gax.Rest" Version="4.8.0"/>
<PackageReference Include="Google.Apis.Storage.v1" Version="1.68.0.3431"/>
<PackageReference Include="Google.Cloud.Storage.V1" Version="4.10.0"/>
<PackageReference Include="ManagedCode.Communication" Version="8.0.2" />
<PackageReference Include="ManagedCode.Communication" Version="8.0.3" />
<PackageReference Include="Humanizer.Core" Version="2.14.1"/>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1"/>
<PackageReference Include="System.Linq.Async" Version="6.0.1"/>
Expand Down

0 comments on commit 16e6353

Please sign in to comment.