From 76a763e1f842543a53bc28db681d963d0fc4ae12 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 10 Dec 2011 20:03:49 +0100 Subject: * apt-pkg/contrib/fileutl.{h,cc}: - implement a ModificationTime method for FileFd --- apt-pkg/edsp/edspindexfile.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'apt-pkg/edsp') diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc index 058cef636..5d824f9cb 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -49,11 +49,8 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const // Store the IMS information pkgCache::PkgFileIterator CFile = Gen.GetCurFile(); - struct stat St; - if (fstat(Pkg.Fd(),&St) != 0) - return _error->Errno("fstat","Failed to stat"); - CFile->Size = St.st_size; - CFile->mtime = St.st_mtime; + CFile->Size = Pkg.FileSize(); + CFile->mtime = Pkg.ModificationTime(); CFile->Archive = Gen.WriteUniqString("edsp::scenario"); if (Gen.MergeList(Parser) == false) -- cgit v1.2.3