Skip to content

Commit

Permalink
Fix issue where multi-file product files did not get sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
svniemeijer committed Aug 1, 2024
1 parent 1213237 commit 0590885
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* Fixed issue where paths of a multi-file product were not passed as a
sorted list to the product type extension.

6.4 2024-03-14
~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion muninn/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def _check_paths(self, paths, action):
if len(set(basenames)) < len(basenames):
raise Error("basename of each part should be unique for multi-part products")

return [path.replace('\\', '/') for path in paths]
return sorted([path.replace('\\', '/') for path in paths])

def _extract_hash_type(self, hash_value):
prefix, middle, _ = hash_value.partition(':')
Expand Down
2 changes: 1 addition & 1 deletion muninn/tools/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __call__(self, parser, namespace, values, option_string=None):

def expand_stem(stem):
try:
return glob.glob(stem + "*")
return sorted(glob.glob(stem + "*"))
except EnvironmentError as error:
raise Error("unable to expand stem \"%s\" [%s]" % (stem, error))

Expand Down

0 comments on commit 0590885

Please sign in to comment.