Skip to content

Commit b6724dc

Browse files
committed
Merge branch 'dont_scan_dotfiles'
Ignore any files or directories whose name starts with a dot. Based on the commit of Chris.
2 parents 982fd97 + 3dffefe commit b6724dc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

es-app/src/GamelistDB.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "Log.h"
33
#include "MetaData.h"
44
#include "SystemData.h"
5+
#include <boost/algorithm/string/predicate.hpp>
56
#include <boost/assign.hpp>
67
#include <map>
78
#include <sstream>
@@ -433,6 +434,13 @@ bool populate_recursive(const fs::path& relativeTo, const std::vector<std::strin
433434

434435
fs::path path = *dir;
435436

437+
// Ignore any filenames starting with a dot.
438+
// Generally a good idea on unix-ish systems, but especially important on OS X when files are stored
439+
// on a filesystem (e.g. network share) which does not have native support for HFS+ metadata.
440+
// In that situation, OS X puts ._SomeFile clutter all over the place.
441+
if (boost::starts_with(path.string(), "."))
442+
continue;
443+
436444
// if the extension is on our list
437445
if(std::find(extensions.begin(), extensions.end(), path.extension().string()) != extensions.end())
438446
{

0 commit comments

Comments
 (0)