From f6c702eba601aa3ecf253d1a4d9119949a0a2cf9 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 8 Dec 2007 12:15:21 -0200 Subject: * Applied patch from Alexander Winston to use 'min' as symbol for minute, closes: #219034. --- apt-pkg/contrib/strutl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg/contrib') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 006452af4..a04c266ba 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -331,19 +331,19 @@ string TimeToStr(unsigned long Sec) { if (Sec > 60*60*24) { - sprintf(S,"%lid %lih%lim%lis",Sec/60/60/24,(Sec/60/60) % 24,(Sec/60) % 60,Sec % 60); + sprintf(S,"%lid %lih%limin%lis",Sec/60/60/24,(Sec/60/60) % 24,(Sec/60) % 60,Sec % 60); break; } if (Sec > 60*60) { - sprintf(S,"%lih%lim%lis",Sec/60/60,(Sec/60) % 60,Sec % 60); + sprintf(S,"%lih%limin%lis",Sec/60/60,(Sec/60) % 60,Sec % 60); break; } if (Sec > 60) { - sprintf(S,"%lim%lis",Sec/60,Sec % 60); + sprintf(S,"%limin%lis",Sec/60,Sec % 60); break; } -- cgit v1.2.3 From db2cca1129fa2d88eae80e1c4a17e263236a95a3 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sun, 16 Dec 2007 18:53:32 -0200 Subject: * apt-pkg/contrib/configuration.cc: - if RootDir is set, then FindFile and FindDir will return paths relative to the directory stored in RootDir, closes: #456457. --- apt-pkg/contrib/configuration.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apt-pkg/contrib') diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 3109fd7a5..e8301d918 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -173,6 +173,11 @@ string Configuration::Find(const char *Name,const char *Default) const */ string Configuration::FindFile(const char *Name,const char *Default) const { + const Item *RootItem = Lookup("RootDir"); + std::string rootDir = (RootItem == 0) ? "" : RootItem->Value; + if(rootDir.size() > 0 && rootDir[rootDir.size() - 1] != '/') + rootDir.push_back('/'); + const Item *Itm = Lookup(Name); if (Itm == 0 || Itm->Value.empty() == true) { @@ -204,7 +209,7 @@ string Configuration::FindFile(const char *Name,const char *Default) const Itm = Itm->Parent; } - return val; + return rootDir + val; } /*}}}*/ // Configuration::FindDir - Find a directory name /*{{{*/ -- cgit v1.2.3