database.cc 849 B

123456789101112131415161718192021222324252627
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: database.cc,v 1.2 2001/02/20 07:03:16 jgg Exp $
  4. /* ######################################################################
  5. Data Base Abstraction
  6. ##################################################################### */
  7. /*}}}*/
  8. // Include Files /*{{{*/
  9. #include <apt-pkg/database.h>
  10. /*}}}*/
  11. // DataBase::GetMetaTmp - Get the temp dir /*{{{*/
  12. // ---------------------------------------------------------------------
  13. /* This re-initializes the meta temporary directory if it hasn't yet
  14. been inited for this cycle. The flag is the emptyness of MetaDir */
  15. bool pkgDataBase::GetMetaTmp(string &Dir)
  16. {
  17. if (MetaDir.empty() == true)
  18. if (InitMetaTmp(MetaDir) == false)
  19. return false;
  20. Dir = MetaDir;
  21. return true;
  22. }
  23. /*}}}*/