diff --git a/pyerrors/input/openQCD.py b/pyerrors/input/openQCD.py index f32663fe..d4da549f 100644 --- a/pyerrors/input/openQCD.py +++ b/pyerrors/input/openQCD.py @@ -92,6 +92,11 @@ def read_rwms(path, prefix, version='2.0', names=None, **kwargs): if names is None: rep_names = [] for entry in ls: + truncated_entry = entry + suffixes = [".dat", ".rwms", ".ms1"] + for suffix in suffixes: + if truncated_entry.endswith(suffix): + truncated_entry = truncated_entry[0:-len(suffix)] truncated_entry = entry.split('.')[0] idx = truncated_entry.index('r') rep_names.append(truncated_entry[:idx] + '|' + truncated_entry[idx:])