Skip to content

Commit

Permalink
fix get file
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Aug 1, 2024
1 parent 105efcc commit 16f35ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BeeNet.Client/BeeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public async Task<FileResponse> GetFileAsync(
{
ArgumentNullException.ThrowIfNull(address, nameof(address));

if (address.Path is null)
if (!address.HasPath)
{
var response = await generatedClient.BzzGetAsync(
address.Hash.ToString(),
Expand All @@ -495,7 +495,7 @@ public async Task<FileResponse> GetFileAsync(
{
var response = await generatedClient.BzzGetAsync(
address.Hash.ToString(),
address.Path.ToString(),
address.Path,
(SwarmRedundancyStrategy3?)swarmRedundancyStrategy,
swarmRedundancyFallbackMode,
swarmChunkRetrievalTimeout,
Expand Down
1 change: 1 addition & 0 deletions src/BeeNet.Core/Models/SwarmAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public SwarmAddress(string address)

// Properties.
public SwarmHash Hash { get; }
public bool HasPath => Path != Separator.ToString();
public string Path { get; }

// Methods.
Expand Down

0 comments on commit 16f35ff

Please sign in to comment.