summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-26 20:42:56 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-26 20:42:56 +0000
commit820b027cd89d731b3e1c63c969c05642798e8247 (patch)
tree6ea4fbd8860f4705996a2ef92064d52c088abe20
parentca55df65b27dd77a9f0a841547386f61bc36e7e0 (diff)
downloadportage-820b027cd89d731b3e1c63c969c05642798e8247.tar.gz
portage-820b027cd89d731b3e1c63c969c05642798e8247.tar.bz2
portage-820b027cd89d731b3e1c63c969c05642798e8247.zip
Make StaticFileSet.multiBuilder() filter hidden files and directories. Thanks
to oahong for reporting. svn path=/main/trunk/; revision=13193
-rw-r--r--pym/portage/sets/files.py5
1 files changed, 5 insertions, 0 deletions
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,