// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: cdrom.cc,v 1.6 1998/12/22 07:52:05 jgg Exp $
+// $Id: cdrom.cc,v 1.7 1998/12/22 08:20:55 jgg Exp $
/* ######################################################################
CDROM URI method for APT
}
const Configuration::Item *Top = Database.Tree("CD");
+ if (Top != 0)
+ Top = Top->Child;
+
for (; Top != 0;)
{
if (Top->Value == Name)
if (NewID == ID)
{
Res.Filename = CDROM + File;
- if (FileExists(Res.Filename) == false)
+ struct stat Buf;
+ if (stat(Res.Filename.c_str(),&Buf) != 0)
return _error->Error("File not found");
CurrentID = ID;
- Res.LastModified = Itm->LastModified;
+ Res.LastModified = Buf.st_mtime;
Res.IMSHit = true;
+ Res.Size = Buf.st_size;
URIDone(Res);
return true;
}