diff --git a/src/BeeNet.Client/BeeClient.cs b/src/BeeNet.Client/BeeClient.cs index 2a51b77..1ee3c26 100644 --- a/src/BeeNet.Client/BeeClient.cs +++ b/src/BeeNet.Client/BeeClient.cs @@ -478,7 +478,7 @@ public async Task GetFileAsync( { ArgumentNullException.ThrowIfNull(address, nameof(address)); - if (address.Path is null) + if (!address.HasPath) { var response = await generatedClient.BzzGetAsync( address.Hash.ToString(), @@ -495,7 +495,7 @@ public async Task GetFileAsync( { var response = await generatedClient.BzzGetAsync( address.Hash.ToString(), - address.Path.ToString(), + address.Path, (SwarmRedundancyStrategy3?)swarmRedundancyStrategy, swarmRedundancyFallbackMode, swarmChunkRetrievalTimeout, diff --git a/src/BeeNet.Core/Models/SwarmAddress.cs b/src/BeeNet.Core/Models/SwarmAddress.cs index f1b12aa..fef2431 100644 --- a/src/BeeNet.Core/Models/SwarmAddress.cs +++ b/src/BeeNet.Core/Models/SwarmAddress.cs @@ -47,6 +47,7 @@ public SwarmAddress(string address) // Properties. public SwarmHash Hash { get; } + public bool HasPath => Path != Separator.ToString(); public string Path { get; } // Methods.