diff --git a/feed b/feed index d09b46e..c7f707b 100755 --- a/feed +++ b/feed @@ -603,7 +603,7 @@ def expand_glob(sources: list, weights: list) -> tuple: ''' Let's say that sources=["foo", "bar*"] and weight=["2", "3"] and on filesystem there are bar1 and bar2. - Result: ["foo", "bar1", "bar2"], ["2", "3", "3"] + Result: ["foo", "bar1", "bar2"], ["2", "1.5", "1.5"] ''' new_sources = [] new_weights = [] @@ -614,7 +614,7 @@ def expand_glob(sources: list, weights: list) -> tuple: else: expanded_source = [src] logging.debug("glob: %s -> %s", src, expanded_source) - expanded_weight = [weight] * len(expanded_source) + expanded_weight = [weight / len(expanded_source)] * len(expanded_source) new_sources += expanded_source new_weights += expanded_weight