From e6dd072d4b73383c6cc6434c6c034b003ec7ab30 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 2 Apr 2009 08:37:24 +0000 Subject: [PATCH] Patch by Fatih. BUG:FIXED:8612 --- pisi/util.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pisi/util.py b/pisi/util.py index 62a3ddef..8c77ec52 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -20,6 +20,7 @@ import sys import sha import shutil import string +import fnmatch import statvfs import operator import subprocess @@ -349,8 +350,10 @@ def get_file_hashes(top, excludePrefix=None, removePrefix=None): def is_included(path): if excludePrefix: temp = remove_prefix(removePrefix, path) - if len(filter(lambda x: temp.startswith(x), excludePrefix)) > 0: - return False + while temp != "/": + if len(filter(lambda x: fnmatch.fnmatch(temp, x), excludePrefix)) > 0: + return False + temp = os.path.dirname(temp) return True # single file/symlink case