fix: check error with -ENOMEDIUM not ENOMEDIUM

Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
This commit is contained in:
Weixie Cui
2026-03-01 10:24:45 +00:00
committed by Luca Boccassi
parent d423ec258c
commit 4980bd05b1
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -512,7 +512,7 @@ static void raw_pull_job_on_finished(PullJob *j) {
* checksum file. */
if (j == p->raw_job) {
if (j->error == ENOMEDIUM) /* HTTP 404 */
if (j->error == -ENOMEDIUM) /* HTTP 404 */
r = log_error_errno(j->error, "Failed to retrieve image file. (Wrong URL?)");
else
r = log_error_errno(j->error, "Failed to retrieve image file.");
+1 -1
View File
@@ -430,7 +430,7 @@ static void tar_pull_job_on_finished(PullJob *j) {
clear_progress_bar(/* prefix= */ NULL);
if (j == p->tar_job) {
if (j->error == ENOMEDIUM) /* HTTP 404 */
if (j->error == -ENOMEDIUM) /* HTTP 404 */
r = log_error_errno(j->error, "Failed to retrieve image file. (Wrong URL?)");
else
r = log_error_errno(j->error, "Failed to retrieve image file.");