fix: check error with -ENOMEDIUM not ENOMEDIUM
Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
This commit is contained in:
committed by
Luca Boccassi
parent
d423ec258c
commit
4980bd05b1
@@ -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.");
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user