Skip to content

Commit

Permalink
Merge pull request #430 from vlakoff/DownloadAvatarHeader
Browse files Browse the repository at this point in the history
Fix erroneous filename of downloaded profile header
  • Loading branch information
sim0n00ps authored Jun 24, 2024
2 parents 6897a20 + 2d5801d commit bbb81fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions OF DL/Helpers/DownloadHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,7 @@ public async Task DownloadAvatarHeader(string? avatarUrl, string? headerUrl, str
List<string> headerMD5Hashes = WidevineClient.Utils.CalculateFolderMD5(folder + headerpath);

Uri uri = new(headerUrl);
string filename = System.IO.Path.GetFileName(uri.LocalPath);
string destinationPath = $"{folder}{headerpath}/{filename}";
string destinationPath = $"{folder}{headerpath}/";

var client = new HttpClient();

Expand Down Expand Up @@ -876,7 +875,6 @@ public async Task DownloadAvatarHeader(string? avatarUrl, string? headerUrl, str
}
File.SetLastWriteTime(destinationPath, response.Content.Headers.LastModified?.LocalDateTime ?? DateTime.Now);
}

}
}
catch (Exception ex)
Expand Down

0 comments on commit bbb81fb

Please sign in to comment.