mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
setup: Enhance URL Handling to Support Partial Inputs (#30681)
* easy urls * better old-commit-hash: 4df85062c52fbbbdc4e461e317b6cb01a6d76ec1
This commit is contained in:
@@ -34,6 +34,11 @@ bool is_elf(char *fname) {
|
||||
}
|
||||
|
||||
void Setup::download(QString url) {
|
||||
// autocomplete incomplete urls
|
||||
if (QRegularExpression("^([^/.]+)/([^/]+)$").match(url).hasMatch()) {
|
||||
url.prepend("https://installer.comma.ai/");
|
||||
}
|
||||
|
||||
CURL *curl = curl_easy_init();
|
||||
if (!curl) {
|
||||
emit finished(url, tr("Something went wrong. Reboot the device."));
|
||||
|
||||
Reference in New Issue
Block a user