Skip to content

Commit

Permalink
Fixed FFMPEG URL in updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Bioruebe committed Jul 27, 2018
1 parent a6e5f64 commit e14b70f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions UniExtractUpdater.au3
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Func _GetFFMPEG()
If $ret <> 0 Then Exit MsgBox(48, $sUpdaterTitle, "Failed to extract update package " & $return & "." & @CRLF & @CRLF & "Make sure Universal Extractor is up to date and try again, or unpack the file manually to " & $sOSArchDir)

; Download license information
If Not FileExists($sDocsDir & "FFmpeg_license.html") Then _Download("", $sDocsDir, False)
If Not FileExists($sDocsDir & "FFmpeg_license.html") Then _Download("https://ffmpeg.org/legal.html", $sDocsDir, False)

Run($sUniExtract)
EndFunc
Expand Down Expand Up @@ -106,7 +106,7 @@ Func _Download($sURL, $sDir = @ScriptDir, $bCreateBackup = True)
If InetGetInfo($hDownload, 4) <> 0 Then
GUIDelete($hGUI)
If $bCreateBackup Then FileMove($sBackupFile, $sFile, 1)
MsgBox(48, $sUpdaterTitle, 'The file ' & $sURL & ' could not be downloaded. Please ensure that you are connected to the internet and try again.')
_DownloadError($sURL)
Return SetError(1, 0, 0)
EndIf
$iBytesReceived = InetGetInfo($hDownload, 0)
Expand All @@ -118,10 +118,14 @@ Func _Download($sURL, $sDir = @ScriptDir, $bCreateBackup = True)
GUIDelete($hGUI)
If Not FileExists($sFile) Then
If $bCreateBackup Then FileMove($sBackupFile, $sFile, 1)
MsgBox(48, $sUpdaterTitle, 'The file ' & $sURL & ' could not be downloaded. Please ensure that you are connected to the internet and try again.')
_DownloadError($sURL)
Return SetError(1, 0, 0)
EndIf

If $bCreateBackup Then FileDelete($sBackupFile)
Return $sFile
EndFunc

Func _DownloadError($sURL)
MsgBox(48, $sUpdaterTitle, 'The file ' & $sURL & ' could not be downloaded. Please ensure that you are connected to the internet and try again.')
EndFunc

0 comments on commit e14b70f

Please sign in to comment.