Skip to content

Commit

Permalink
Try to fix bad uri error when there is whitespace in the uri
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeliux committed Aug 16, 2024
1 parent 648deb7 commit c6bcd48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/Kryptor.Cli.Shared/Wordlist/DownloadSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ protected override async Task<bool> RunAsync(ISessionHost sessionHost, Cancellat
dest.Create();
}

await Downloader.DownloadFileTaskAsync(IndexEntry.Uri.ToString(), dest, cancellationToken);
await Downloader.DownloadFileTaskAsync(IndexEntry.Uri.OriginalString, dest, cancellationToken);
}

Downloader.Dispose();
Expand Down
2 changes: 1 addition & 1 deletion cli/Kryptor.Cli.Shared/Wordlist/IndexSessionHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public override void Start(ClientContext context)

foreach (WordlistIndexEntryV2 entry in LocalIndex.Wordlists)
{
string text = $"| {entry.Id} | {entry.Name} | {entry.Lines.FormatWithCommas()} | {entry.Words.FormatWithCommas()} | {Utilities.ConvertBytes(entry.Size)} | [{(entry.Compressed ? "Compressed File" : "Text File")}]({entry.Uri}) |\n";
string text = $"| {entry.Id} | {entry.Name} | {entry.Lines.FormatWithCommas()} | {entry.Words.FormatWithCommas()} | {Utilities.ConvertBytes(entry.Size)} | [{(entry.Compressed ? "Compressed File" : "Text File")}]({entry.Uri.OriginalString}) |\n";
var buffer = Encoding.UTF8.GetBytes(text);
f.Write(buffer, 0, buffer.Length);
}
Expand Down

0 comments on commit c6bcd48

Please sign in to comment.