X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/a2ec4d22dd77a363cd5b1f8b55ed34ba88331396..cb714f283871f3deb9e0f8566ab6866ae9d7791e:/methods/http.cc diff --git a/methods/http.cc b/methods/http.cc index 61321c850..b0fb89fda 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -943,7 +943,8 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv) if (Srv->StartPos >= 0) { Res.ResumePoint = Srv->StartPos; - ftruncate(File->Fd(),Srv->StartPos); + if (ftruncate(File->Fd(),Srv->StartPos) < 0) + _error->Errno("ftruncate", _("Failed to truncate file")); } // Set the start point