Skip to content

Commit

Permalink
Merge pull request #123 from ckocyigit/master
Browse files Browse the repository at this point in the history
Use UriBuilder to correctly handle inserting with query parameters
  • Loading branch information
sebagomez authored Oct 6, 2023
2 parents f8fccdd + 61e3a7e commit 45a54e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/StorageLibrary/AzureFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public async Task<List<FileShareItemWrapper>> ListFilesAndDirsAsync(string share
var files = dir.GetFilesAndDirectoriesAsync();
await foreach(var file in files)
{
items.Add(new FileShareItemWrapper($"{dir.Uri.AbsoluteUri}/{file.Name}", !file.IsDirectory, file.FileSize));
var uriBuilder = new UriBuilder(dir.Uri);
uriBuilder.Path += $"/{file.Name}";
var uri = uriBuilder.Uri;
items.Add(new FileShareItemWrapper(uri.AbsoluteUri, !file.IsDirectory, file.FileSize));
}

return items;
Expand Down

0 comments on commit 45a54e7

Please sign in to comment.