From 820b027cd89d731b3e1c63c969c05642798e8247 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 26 Mar 2009 20:42:56 +0000 Subject: [PATCH] Make StaticFileSet.multiBuilder() filter hidden files and directories. Thanks to oahong for reporting. svn path=/main/trunk/; revision=13193 --- pym/portage/sets/files.py | 5 +++++ 1 file changed, 5 insertions(+) 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, -- 2.26.2