Human error failsave for updating
This commit is contained in:
@@ -930,7 +930,6 @@ dialog_autowrap = true
|
|||||||
cancel_button_text = "Download Song"
|
cancel_button_text = "Download Song"
|
||||||
|
|
||||||
[node name="UpdateChecker" type="Control" parent="."]
|
[node name="UpdateChecker" type="Control" parent="."]
|
||||||
visible = false
|
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 3
|
anchors_preset = 3
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
|
|||||||
+2
-3
@@ -73,8 +73,7 @@ func _on_link_button_pressed() -> void:
|
|||||||
elif OS.get_name() == "Linux":
|
elif OS.get_name() == "Linux":
|
||||||
DownloadLink = "https://github.com/notdraimdev/Simplaudio/releases/latest/download/Linux.zip"
|
DownloadLink = "https://github.com/notdraimdev/Simplaudio/releases/latest/download/Linux.zip"
|
||||||
if DownloadLink.is_empty() != true:
|
if DownloadLink.is_empty() != true:
|
||||||
var error = download_request.request(
|
var error = download_request.request(DownloadLink
|
||||||
DownloadLink
|
|
||||||
)
|
)
|
||||||
if error != OK:
|
if error != OK:
|
||||||
print("! DOWNLOAD ERROR: " + str(error))
|
print("! DOWNLOAD ERROR: " + str(error))
|
||||||
@@ -99,7 +98,7 @@ func _on_download_request_completed(result: int, response_code: int, headers: Pa
|
|||||||
unzipper.open(GetLocalPath()+"download.zip")
|
unzipper.open(GetLocalPath()+"download.zip")
|
||||||
var files:PackedStringArray = unzipper.get_files()
|
var files:PackedStringArray = unzipper.get_files()
|
||||||
for file in files:
|
for file in files:
|
||||||
var actualfile = file.replace("MusicPlayerExports/","")
|
var actualfile = file.replace("Linux/","").replace("Windows/","").replace("Android/","")
|
||||||
print("FILE: " + actualfile)
|
print("FILE: " + actualfile)
|
||||||
var FileAcess:FileAccess = FileAccess.open(GetLocalPath() + actualfile,FileAccess.WRITE_READ)
|
var FileAcess:FileAccess = FileAccess.open(GetLocalPath() + actualfile,FileAccess.WRITE_READ)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user