ui/setup: use the mode "wb" instead of "w". (#32181)

This commit is contained in:
Dean Lee
2024-04-13 01:32:11 +08:00
committed by GitHub
parent 1f37de1870
commit 1c491513b6
+1 -1
View File
@@ -51,7 +51,7 @@ void Setup::download(QString url) {
list = curl_slist_append(list, ("X-openpilot-serial: " + Hardware::get_serial()).c_str());
char tmpfile[] = "/tmp/installer_XXXXXX";
FILE *fp = fdopen(mkstemp(tmpfile), "w");
FILE *fp = fdopen(mkstemp(tmpfile), "wb");
curl_easy_setopt(curl, CURLOPT_URL, url.toStdString().c_str());
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, NULL);