X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/1eba782fc3c55528a4da14d79e114874b9299453..4aa8cc9127bdf5837b51b49d917c4ac229b2c540:/apt-pkg/acquire.cc diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 7a44d8599..33c98cf2e 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -466,7 +466,7 @@ void pkgAcquire::SetFds(int &Fd,fd_set *RSet,fd_set *WSet) void pkgAcquire::RunFds(fd_set *RSet,fd_set *WSet) { RunFdsSane(RSet, WSet); -}; +} /*}}}*/ // Acquire::RunFdsSane - Deal with active FDs /*{{{*/ // --------------------------------------------------------------------- @@ -1258,13 +1258,12 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) snprintf(msg,sizeof(msg), _("Retrieving file %li of %li"), i, TotalItems); // build the status str - status << "dlstatus:" << i - << ":" << std::setprecision(3) << Percent - << ":" << msg - << endl; - - std::string const dlstatus = status.str(); - FileFd::Write(fd, dlstatus.c_str(), dlstatus.size()); + std::ostringstream str; + str.imbue(std::locale::classic()); + str.precision(4); + str << "dlstatus" << ':' << std::fixed << i << ':' << Percent << ':' << msg << '\n'; + auto const dlstatus = str.str(); + FileFd::Write(fd, dlstatus.data(), dlstatus.size()); } return true;