Skip to content

Commit

Permalink
refactor: Remove repetitive check
Browse files Browse the repository at this point in the history
  • Loading branch information
Ushie committed Jan 16, 2025
1 parent 7e3f8cf commit 0ad1854
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,9 @@ abstract class DownloadStep : Step() {

// If the current mirror fails, try other mirrors
if (!successfulDownload && isUsingMirror) {
for (mirror in Mirror.entries) {
if (mirror == preferenceManager.mirror) continue

for (mirror in Mirror.entries - preferenceManager.mirror) {
downloadUrl = mirror.baseUrl + url

if (download(downloadUrl, destination, runner)) {
preferenceManager.mirror = mirror
successfulDownload = true
Expand Down

0 comments on commit 0ad1854

Please sign in to comment.