From: Zac Medico Date: Thu, 26 Mar 2009 20:42:56 +0000 (-0000) Subject: Make StaticFileSet.multiBuilder() filter hidden files and directories. Thanks X-Git-Tag: v2.2_rc28~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=820b027cd89d731b3e1c63c969c05642798e8247;p=portage.git Make StaticFileSet.multiBuilder() filter hidden files and directories. Thanks to oahong for reporting. svn path=/main/trunk/; revision=13193 --- diff --git a/pym/portage/sets/files.py b/pym/portage/sets/files.py index c9e71a332..8abb3481b 100644 --- a/pym/portage/sets/files.py +++ b/pym/portage/sets/files.py @@ -125,7 +125,12 @@ class StaticFileSet(EditablePackageSet): if os.path.isdir(directory): directory = normalize_path(directory) for parent, dirs, files in os.walk(directory): + for d in dirs[:]: + if d[:1] == '.': + dirs.remove(d) for filename in files: + if filename[:1] == '.': + continue if filename.endswith(".metadata"): continue filename = os.path.join(parent,