setup: write installer URL to tmpfile (#27426)

* setup: write installer URL to tmpfile

* missed ptr type
old-commit-hash: 90db46e775
beeps
Cameron Clough 2 years ago committed by GitHub
parent 854314765c
commit d35ed17e63
  1. 5
      selfdrive/ui/qt/setup/setup.cc

@ -59,6 +59,11 @@ void Setup::download(QString url) {
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &res_status);
if (ret == CURLE_OK && res_status == 200 && is_elf(tmpfile)) {
rename(tmpfile, "/tmp/installer");
FILE *fp_url = fopen("/tmp/installer_url", "w");
fprintf(fp_url, "%s", url.toStdString().c_str());
fclose(fp_url);
emit finished(true);
} else {
emit finished(false);

Loading…
Cancel
Save