From 0cc92c8ff30987dc9466e3ea080f3fde4088f99b Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Thu, 27 Jun 2019 08:52:57 -0500 Subject: [PATCH] assume lists with no file extension are in raw txt format --- src/FilterLists.Agent/ListArchiver/DownloadList.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FilterLists.Agent/ListArchiver/DownloadList.cs b/src/FilterLists.Agent/ListArchiver/DownloadList.cs index aae7d53e0..25914086e 100644 --- a/src/FilterLists.Agent/ListArchiver/DownloadList.cs +++ b/src/FilterLists.Agent/ListArchiver/DownloadList.cs @@ -31,9 +31,10 @@ public Handler(HttpClient httpClient) protected override async Task Handle(Command request, CancellationToken cancellationToken) { - if (Path.GetExtension(request.ListInfo.ViewUrl.AbsolutePath) == ".txt") + if (!Path.HasExtension(request.ListInfo.ViewUrl.AbsolutePath) || + Path.GetExtension(request.ListInfo.ViewUrl.AbsolutePath) == ".txt") { - Debug.WriteLine($"Downloading list {request.ListInfo.Id}..."); + Debug.WriteLine($"Downloading list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}..."); try { using (var result = await _httpClient.GetAsync(request.ListInfo.ViewUrl, cancellationToken))