aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-02-06 23:07:11 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-02-06 23:07:11 +0000
commit70e7b4d8c51be1aa06bdd6cecb2fc375185bc69a (patch)
treecf955fe97b34b7d9507b886bea26836e77f7d9b9
parentf22507ad73e28b4555c02cf11d755df1a819cffc (diff)
downloadpaludis-70e7b4d8c51be1aa06bdd6cecb2fc375185bc69a.tar.gz
paludis-70e7b4d8c51be1aa06bdd6cecb2fc375185bc69a.tar.xz
Add sorting by i-node for DirIterator
-rw-r--r--paludis/merger.cc6
-rw-r--r--paludis/ndbam_unmerger.cc2
-rw-r--r--paludis/repositories/e/exndbam_repository.cc5
-rw-r--r--paludis/repositories/e/traditional_layout.cc14
-rw-r--r--paludis/repositories/e/vdb_repository.cc8
-rw-r--r--paludis/repositories/e/vdb_unmerger.cc2
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc2
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc2
-rw-r--r--paludis/repository_name_cache.cc2
-rw-r--r--paludis/util/dir_iterator.cc69
-rw-r--r--paludis/util/dir_iterator.hh23
-rw-r--r--paludis/util/dir_iterator.se21
-rw-r--r--paludis/util/dir_iterator_TEST.cc2
-rw-r--r--paludis/util/files.m42
-rw-r--r--src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc2
15 files changed, 108 insertions, 54 deletions
diff --git a/paludis/merger.cc b/paludis/merger.cc
index c478d29..9b239a9 100644
--- a/paludis/merger.cc
+++ b/paludis/merger.cc
@@ -154,7 +154,7 @@ Merger::do_dir_recursive(bool is_check, const FSEntry & src, const FSEntry & dst
on_enter_dir(is_check, src);
- DirIterator d(src, false), d_end;
+ DirIterator d(src, DirIteratorOptions() + dio_include_dotfiles + dio_inode_sort), d_end;
if (! is_check && d == d_end && dst != _options.root.realpath())
Log::get_instance()->message(ll_warning, lc_context) << "Installing empty directory '"
@@ -730,7 +730,7 @@ Merger::rewrite_symlink_as_needed(const FSEntry & src, const FSEntry & dst_dir)
void
Merger::record_renamed_dir_recursive(const FSEntry & dst)
{
- for (DirIterator d(dst, false), d_end ; d != d_end ; ++d)
+ for (DirIterator d(dst, DirIteratorOptions() + dio_include_dotfiles + dio_inode_sort), d_end ; d != d_end ; ++d)
{
if (! _options.no_chown)
{
@@ -786,7 +786,7 @@ Merger::record_renamed_dir_recursive(const FSEntry & dst)
void
Merger::relabel_dir_recursive(const FSEntry & src, const FSEntry & dst)
{
- for (DirIterator d(src, false), d_end ; d != d_end ; ++d)
+ for (DirIterator d(src, DirIteratorOptions() + dio_include_dotfiles + dio_inode_sort), d_end ; d != d_end ; ++d)
{
mode_t mode(d->permissions());
tr1::shared_ptr<const SecurityContext> secctx(
diff --git a/paludis/ndbam_unmerger.cc b/paludis/ndbam_unmerger.cc
index 76b8efd..43e7e0c 100644
--- a/paludis/ndbam_unmerger.cc
+++ b/paludis/ndbam_unmerger.cc
@@ -269,7 +269,7 @@ NDBAMUnmerger::check_dir(const FSEntry & f, tr1::shared_ptr<ExtraInfo>) const
{
if (! (_imp->options.root / f).is_directory())
display("--- [!type] " + stringify(f));
- else if (DirIterator(_imp->options.root / f, false) != DirIterator())
+ else if (DirIterator(_imp->options.root / f, DirIteratorOptions() + dio_include_dotfiles + dio_first_only) != DirIterator())
display("--- [!empt] " + stringify(f));
else
return true;
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index bc11a49..480641a 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -338,7 +338,8 @@ ExndbamRepository::merge(const MergeOptions & m)
if (! merger.check())
{
- for (DirIterator d(target_ver_dir, false), d_end ; d != d_end ; ++d)
+ for (DirIterator d(target_ver_dir, DirIteratorOptions() + dio_include_dotfiles), d_end
+ ; d != d_end ; ++d)
FSEntry(*d).unlink();
target_ver_dir.rmdir();
throw InstallActionError("Not proceeding with install due to merge sanity check failing");
@@ -450,7 +451,7 @@ ExndbamRepository::perform_uninstall(const tr1::shared_ptr<const ERepositoryID>
}
}
- for (DirIterator d(ver_dir, false), d_end ; d != d_end ; ++d)
+ for (DirIterator d(ver_dir, DirIteratorOptions() + dio_include_dotfiles), d_end ; d != d_end ; ++d)
FSEntry(*d).unlink();
ver_dir.rmdir();
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index cf06ce9..9f809f4 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -173,7 +173,7 @@ TraditionalLayout::need_category_names() const
{
Log::get_instance()->message(ll_qa, lc_context, "No categories file for repository at '"
+ stringify(_imp->tree_root) + "', faking it");
- for (DirIterator d(_imp->tree_root), d_end ; d != d_end ; ++d)
+ for (DirIterator d(_imp->tree_root, DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
{
if (! d->is_directory_or_symlink_to_directory())
continue;
@@ -213,7 +213,7 @@ TraditionalLayout::need_package_ids(const QualifiedPackageName & n) const
FSEntry path(_imp->tree_root / stringify(n.category) / stringify(n.package));
- for (DirIterator e(path), e_end ; e != e_end ; ++e)
+ for (DirIterator e(path, DirIteratorOptions() + dio_inode_sort), e_end ; e != e_end ; ++e)
{
if (! _imp->entries->is_package_file(n, *e))
continue;
@@ -334,14 +334,14 @@ TraditionalLayout::package_names(const CategoryNamePart & c) const
return tr1::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
if ((_imp->tree_root / stringify(c)).is_directory_or_symlink_to_directory())
- for (DirIterator d(_imp->tree_root / stringify(c)), d_end ; d != d_end ; ++d)
+ for (DirIterator d(_imp->tree_root / stringify(c), DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
{
try
{
if (! d->is_directory_or_symlink_to_directory())
continue;
- if (DirIterator() == std::find_if(DirIterator(*d), DirIterator(),
+ if (DirIterator() == std::find_if(DirIterator(*d, DirIteratorOptions() + dio_inode_sort), DirIterator(),
tr1::bind(&ERepositoryEntries::is_package_file, _imp->entries.get(),
c + PackageNamePart(d->basename()), _1)))
continue;
@@ -447,7 +447,7 @@ TraditionalLayout::eapi_ebuild_suffix() const
FSEntry
TraditionalLayout::package_file(const PackageID & id) const
{
- for (DirIterator d(package_directory(id.name())), d_end ; d != d_end ; ++d)
+ for (DirIterator d(package_directory(id.name()), DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
{
std::string::size_type p(d->basename().rfind('.'));
if (std::string::npos == p)
@@ -557,7 +557,7 @@ namespace
if (! d.exists())
return;
- std::list<FSEntry> files((DirIterator(d)),
+ std::list<FSEntry> files((DirIterator(d, DirIteratorOptions() + dio_inode_sort)),
DirIterator());
for (std::list<FSEntry>::iterator f(files.begin()) ;
f != files.end() ; ++f)
@@ -586,7 +586,7 @@ TraditionalLayout::manifest_files(const QualifiedPackageName & qpn) const
tr1::shared_ptr<Map<FSEntry, std::string> > result(new Map<FSEntry, std::string>);
FSEntry package_dir = _imp->repository->layout()->package_directory(qpn);
- std::list<FSEntry> package_files((DirIterator(package_dir)),
+ std::list<FSEntry> package_files((DirIterator(package_dir, DirIteratorOptions() + dio_inode_sort)),
DirIterator());
for (std::list<FSEntry>::iterator f(package_files.begin()) ;
f != package_files.end() ; ++f)
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 441c25c..df716f7 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -437,7 +437,7 @@ VDBRepository::perform_uninstall(const tr1::shared_ptr<const ERepositoryID> & id
}
/* remove vdb entry */
- for (DirIterator d(pkg_dir, false), d_end ; d != d_end ; ++d)
+ for (DirIterator d(pkg_dir, DirIteratorOptions() + dio_include_dotfiles), d_end ; d != d_end ; ++d)
FSEntry(*d).unlink();
pkg_dir.rmdir();
}
@@ -747,7 +747,7 @@ VDBRepository::merge(const MergeOptions & m)
if (! merger.check())
{
- for (DirIterator d(tmp_vdb_dir, false), d_end ; d != d_end ; ++d)
+ for (DirIterator d(tmp_vdb_dir, DirIteratorOptions() + dio_include_dotfiles), d_end ; d != d_end ; ++d)
FSEntry(*d).unlink();
tmp_vdb_dir.rmdir();
throw InstallActionError("Not proceeding with install due to merge sanity check failing");
@@ -790,7 +790,7 @@ VDBRepository::need_category_names() const
Context context("When loading category names from '" + stringify(_imp->params.location) + "':");
- for (DirIterator d(_imp->params.location), d_end ; d != d_end ; ++d)
+ for (DirIterator d(_imp->params.location, DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
try
{
if (d->is_directory_or_symlink_to_directory())
@@ -819,7 +819,7 @@ VDBRepository::need_package_ids(const CategoryNamePart & c) const
tr1::shared_ptr<QualifiedPackageNameSet> q(new QualifiedPackageNameSet);
- for (DirIterator d(_imp->params.location / stringify(c)), d_end ; d != d_end ; ++d)
+ for (DirIterator d(_imp->params.location / stringify(c), DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
try
{
if (d->is_directory_or_symlink_to_directory())
diff --git a/paludis/repositories/e/vdb_unmerger.cc b/paludis/repositories/e/vdb_unmerger.cc
index 209970b..be298d2 100644
--- a/paludis/repositories/e/vdb_unmerger.cc
+++ b/paludis/repositories/e/vdb_unmerger.cc
@@ -312,7 +312,7 @@ VDBUnmerger::check_dir(const FSEntry & f, tr1::shared_ptr<ExtraInfo>) const
{
if (! (_imp->options.root / f).is_directory())
display("--- [!type] " + stringify(f));
- else if (DirIterator(_imp->options.root / f, false) != DirIterator())
+ else if (DirIterator(_imp->options.root / f, DirIteratorOptions() + dio_include_dotfiles + dio_first_only) != DirIterator())
display("--- [!empt] " + stringify(f));
else
return true;
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index ae707e0..204dc58 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -680,7 +680,7 @@ InstalledUnpackagedID::uninstall(const UninstallActionOptions &, const bool repl
unmerger.unmerge();
- for (DirIterator d(ver_dir, false), d_end ; d != d_end ; ++d)
+ for (DirIterator d(ver_dir, DirIteratorOptions() + dio_include_dotfiles), d_end ; d != d_end ; ++d)
FSEntry(*d).unlink();
ver_dir.rmdir();
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index c5512c9..6d3b233 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -307,7 +307,7 @@ InstalledUnpackagedRepository::merge(const MergeOptions & m)
if (! merger.check())
{
- for (DirIterator d(target_ver_dir, false), d_end ; d != d_end ; ++d)
+ for (DirIterator d(target_ver_dir, DirIteratorOptions() + dio_include_dotfiles), d_end ; d != d_end ; ++d)
FSEntry(*d).unlink();
target_ver_dir.rmdir();
throw InstallActionError("Not proceeding with install due to merge sanity check failing");
diff --git a/paludis/repository_name_cache.cc b/paludis/repository_name_cache.cc
index 28b9896..58499c0 100644
--- a/paludis/repository_name_cache.cc
+++ b/paludis/repository_name_cache.cc
@@ -167,7 +167,7 @@ RepositoryNameCache::regenerate_cache() const
+ stringify(_imp->location) + "':");
if (_imp->location.is_directory())
- for (DirIterator i(_imp->location, true), i_end ; i != i_end ; ++i)
+ for (DirIterator i(_imp->location, DirIteratorOptions() + dio_inode_sort), i_end ; i != i_end ; ++i)
FSEntry(*i).unlink();
_imp->location.dirname().mkdir();
diff --git a/paludis/util/dir_iterator.cc b/paludis/util/dir_iterator.cc
index 5af3b44..ecc3f87 100644
--- a/paludis/util/dir_iterator.cc
+++ b/paludis/util/dir_iterator.cc
@@ -2,6 +2,7 @@
/*
* Copyright (c) 2005, 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2008 Fernando J. Pereda
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -21,6 +22,8 @@
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/tr1_functional.hh>
+#include <paludis/util/options.hh>
#include <sys/types.h>
#include <set>
#include <cstring>
@@ -28,6 +31,10 @@
using namespace paludis;
+#include <paludis/util/dir_iterator-se.cc>
+
+typedef std::set<std::pair<ino_t, FSEntry>, tr1::function<bool (std::pair<ino_t, FSEntry>, std::pair<ino_t, FSEntry>)> > EntrySet;
+
namespace paludis
{
/**
@@ -38,14 +45,10 @@ namespace paludis
template<>
struct Implementation<DirIterator>
{
- FSEntry base;
- bool ignore_dotfiles;
- tr1::shared_ptr<std::set<FSEntry> > items;
- std::set<FSEntry>::iterator iter;
-
- Implementation(const FSEntry & b, bool i, tr1::shared_ptr<std::set<FSEntry> > ii) :
- base(b),
- ignore_dotfiles(i),
+ tr1::shared_ptr<EntrySet> items;
+ EntrySet::iterator iter;
+
+ Implementation(tr1::shared_ptr<EntrySet> ii) :
items(ii)
{
}
@@ -57,24 +60,46 @@ DirOpenError::DirOpenError(const FSEntry & location, const int errno_value) thro
{
}
-DirIterator::DirIterator(const FSEntry & base, bool ignore_dotfiles) :
- PrivateImplementationPattern<DirIterator>(new Implementation<DirIterator>(
- base, ignore_dotfiles, tr1::shared_ptr<std::set<FSEntry> >(new std::set<FSEntry>)))
+DirIterator::DirIterator(const FSEntry & base, const DirIteratorOptions & options) :
+ PrivateImplementationPattern<DirIterator>(new Implementation<DirIterator>(tr1::shared_ptr<EntrySet>(new EntrySet)))
{
- DIR * d(opendir(stringify(_imp->base).c_str()));
+ using namespace tr1::placeholders;
+
+ if (options[dio_inode_sort])
+ _imp->items.reset(new EntrySet(
+ tr1::bind(std::less<ino_t>(),
+ tr1::bind<ino_t>(tr1::mem_fn(&std::pair<ino_t, FSEntry>::first), _1),
+ tr1::bind<ino_t>(tr1::mem_fn(&std::pair<ino_t, FSEntry>::first), _2))
+ ));
+ else
+ _imp->items.reset(new EntrySet(
+ tr1::bind(std::less<FSEntry>(),
+ tr1::bind<FSEntry>(tr1::mem_fn(&std::pair<ino_t, FSEntry>::second), _1),
+ tr1::bind<FSEntry>(tr1::mem_fn(&std::pair<ino_t, FSEntry>::second), _2))
+ ));
+
+ DIR * d(opendir(stringify(base).c_str()));
if (0 == d)
- throw DirOpenError(_imp->base, errno);
+ throw DirOpenError(base, errno);
struct dirent * de;
while (0 != ((de = readdir(d))))
- if (_imp->ignore_dotfiles)
+ if (! options[dio_include_dotfiles])
{
if ('.' != de->d_name[0])
- _imp->items->insert(_imp->base / std::string(de->d_name));
+ {
+ _imp->items->insert(std::make_pair(de->d_ino, base / std::string(de->d_name)));
+ if (options[dio_first_only])
+ break;
+ }
}
else if (! (de->d_name[0] == '.' &&
(de->d_name[1] == '\0' || (de->d_name[1] == '.' && de->d_name[2] == '\0'))))
- _imp->items->insert(_imp->base / std::string(de->d_name));
+ {
+ _imp->items->insert(std::make_pair(de->d_ino, base / std::string(de->d_name)));
+ if (options[dio_first_only])
+ break;
+ }
_imp->iter = _imp->items->begin();
@@ -82,15 +107,13 @@ DirIterator::DirIterator(const FSEntry & base, bool ignore_dotfiles) :
}
DirIterator::DirIterator(const DirIterator & other) :
- PrivateImplementationPattern<DirIterator>(new Implementation<DirIterator>(
- other._imp->base, other._imp->ignore_dotfiles, other._imp->items))
+ PrivateImplementationPattern<DirIterator>(new Implementation<DirIterator>(other._imp->items))
{
_imp->iter = other._imp->iter;
}
DirIterator::DirIterator() :
- PrivateImplementationPattern<DirIterator>(new Implementation<DirIterator>(
- FSEntry(""), true, tr1::shared_ptr<std::set<FSEntry> >(new std::set<FSEntry>)))
+ PrivateImplementationPattern<DirIterator>(new Implementation<DirIterator>(tr1::shared_ptr<EntrySet>(new EntrySet)))
{
_imp->iter = _imp->items->end();
}
@@ -104,10 +127,8 @@ DirIterator::operator= (const DirIterator & other)
{
if (this != &other)
{
- _imp->base = other._imp->base;
_imp->items = other._imp->items;
_imp->iter = other._imp->iter;
- _imp->ignore_dotfiles = other._imp->ignore_dotfiles;
}
return *this;
}
@@ -115,13 +136,13 @@ DirIterator::operator= (const DirIterator & other)
const FSEntry &
DirIterator::operator* () const
{
- return *_imp->iter;
+ return _imp->iter->second;
}
const FSEntry *
DirIterator::operator-> () const
{
- return &*_imp->iter;
+ return &_imp->iter->second;
}
DirIterator &
diff --git a/paludis/util/dir_iterator.hh b/paludis/util/dir_iterator.hh
index f95579f..4c5fdf6 100644
--- a/paludis/util/dir_iterator.hh
+++ b/paludis/util/dir_iterator.hh
@@ -22,6 +22,7 @@
#include <iterator>
#include <paludis/util/fs_entry.hh>
+#include <paludis/util/options.hh>
#include <paludis/util/private_implementation_pattern.hh>
#ifdef PALUDIS_HAVE_CONCEPTS
@@ -59,6 +60,16 @@ namespace paludis
///\}
};
+#include <paludis/util/dir_iterator-se.hh>
+
+ /**
+ * Options for a DirIterator.
+ *
+ * \see DirIteratorOption
+ * \see DirIterator
+ */
+ typedef Options<DirIteratorOption> DirIteratorOptions;
+
/**
* An iterator that iterates over the contents of a directory.
*
@@ -85,11 +96,11 @@ namespace paludis
/**
* Constructor, to an FSEntry which must be a directory, with an
- * option to not ignore dotfiles.
+ * option to not ignore dotfiles and an option to do inodesort.
*/
- explicit DirIterator(const FSEntry & base, bool ignore_dotfiles = true);
+ explicit DirIterator(const FSEntry &, const DirIteratorOptions & = DirIteratorOptions());
- DirIterator(const DirIterator & other);
+ DirIterator(const DirIterator &);
/**
* Constructor, creates an end() iterator.
@@ -98,7 +109,7 @@ namespace paludis
~DirIterator();
- DirIterator & operator= (const DirIterator & other);
+ DirIterator & operator= (const DirIterator &);
///\}
@@ -124,9 +135,9 @@ namespace paludis
///\name Comparison operators
///\{
- bool operator== (const DirIterator & other) const
+ bool operator== (const DirIterator &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- bool operator!= (const DirIterator & other) const
+ bool operator!= (const DirIterator &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
diff --git a/paludis/util/dir_iterator.se b/paludis/util/dir_iterator.se
new file mode 100644
index 0000000..00b2246
--- /dev/null
+++ b/paludis/util/dir_iterator.se
@@ -0,0 +1,21 @@
+#!/bin/bash
+# vim: set sw=4 sts=4 et ft=sh :
+
+make_enum_DirIteratorOption()
+{
+ prefix dio
+
+ key dio_include_dotfiles "Skip files whose name start with a dot"
+ key dio_inode_sort "Return items sorted by inode number"
+ key dio_first_only "Return the first item only"
+
+ doxygen_comment << "END"
+ /**
+ * Options for a DirIterator.
+ *
+ * \see DirIterator
+ * \see DirIteratorOptions
+ * \ingroup g_fs
+ */
+END
+}
diff --git a/paludis/util/dir_iterator_TEST.cc b/paludis/util/dir_iterator_TEST.cc
index 7915d62..2d010e6 100644
--- a/paludis/util/dir_iterator_TEST.cc
+++ b/paludis/util/dir_iterator_TEST.cc
@@ -65,7 +65,7 @@ namespace test_cases
{
DirIterator iter(FSEntry("dir_iterator_TEST_dir"));
DirIterator iter1(FSEntry("dir_iterator_TEST_dir"));
- DirIterator iter2(FSEntry("dir_iterator_TEST_dir"), false);
+ DirIterator iter2(FSEntry("dir_iterator_TEST_dir"), DirIteratorOptions() + dio_include_dotfiles);
TEST_CHECK(iter != DirIterator());
TEST_CHECK(DirIterator() != iter);
diff --git a/paludis/util/files.m4 b/paludis/util/files.m4
index 44c7958..ac62bbc 100644
--- a/paludis/util/files.m4
+++ b/paludis/util/files.m4
@@ -18,7 +18,7 @@ add(`cookie', `hh', `cc')
add(`create_iterator', `hh', `fwd', `impl', `test')
add(`damerau_levenshtein', `hh', `cc', `test')
add(`destringify', `hh', `cc', `test')
-add(`dir_iterator', `hh', `cc', `test', `testscript')
+add(`dir_iterator', `hh', `cc', `se', `test', `testscript')
add(`exception', `hh', `cc')
add(`fast_unique_copy', `hh', `test')
add(`fd_output_stream', `hh')
diff --git a/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc b/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
index b4e86f7..d412375 100644
--- a/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
+++ b/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
@@ -231,7 +231,7 @@ Implementation<BrokenLinkageFinder>::walk_directory(const FSEntry & directory)
try
{
- std::for_each(DirIterator(directory, false), DirIterator(),
+ std::for_each(DirIterator(directory, DirIteratorOptions() + dio_include_dotfiles + dio_inode_sort), DirIterator(),
tr1::bind(&Implementation<BrokenLinkageFinder>::check_file, this, _1));
}
catch (const FSError & ex)