~ubuntu-branches/ubuntu/trusty/schroot/trusty

« back to all changes in this revision

Viewing changes to sbuild/sbuild-chroot-config.cc

  • Committer: Bazaar Package Importer
  • Author(s): Roger Leigh
  • Date: 2010-01-16 15:52:15 UTC
  • mfrom: (1.1.21 upstream) (2.2.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100116155215-xzm51gxfze63htsl
* New upstream stable release.
* debian/control: Add ${misc:Depends}.
* Updated it translation.  Thanks to Vincenzo Campanella.
* Updated zh_CN translation.  Thanks to Ji ZhengYu.
* Updated de translattion (Closes: #563818).  Thanks to Holger
  Wansing.
* Updated bash completion script (Closes: #519745).  Thanks to
  Tim Abbott.
* Use boost::filesystem for portable directory iteration,
  removing existing path length restrictions (Closes: #520781).

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "sbuild-chroot.h"
22
22
#include "sbuild-chroot-facet-source-clonable.h"
23
23
#include "sbuild-chroot-config.h"
24
 
#include "sbuild-dirstream.h"
25
24
#include "sbuild-lock.h"
26
25
 
27
26
#include <cassert>
31
30
 
32
31
#include <ext/stdio_filebuf.h>
33
32
 
 
33
#include <boost/filesystem/operations.hpp>
 
34
 
34
35
#include <sys/types.h>
35
36
#include <sys/stat.h>
36
37
#include <fcntl.h>
122
123
  if (dir.empty())
123
124
    return;
124
125
 
125
 
  dirstream stream(dir);
126
 
  direntry de;
127
 
  while (stream >> de)
 
126
  boost::filesystem::path dirpath(dir);
 
127
  boost::filesystem::directory_iterator end_iter;
 
128
  for (boost::filesystem::directory_iterator dirent(dirpath);
 
129
       dirent != end_iter;
 
130
       ++dirent)
128
131
    {
129
 
      std::string name(de.name());
 
132
      std::string name(dirent->leaf());
130
133
 
131
134
      // Skip common directories.
132
135
      if (name == "." || name == "..")