diff --git a/fsl/utils/path.py b/fsl/utils/path.py index 7c001bb91f1b1fc2f4926b35c45f3c3041327182..7ee72abf3fb57e4e8c7808e7cbd3a97bbe1db2e0 100644 --- a/fsl/utils/path.py +++ b/fsl/utils/path.py @@ -331,13 +331,13 @@ def getFileGroup(path, # The path is unambiguously part of a # complete file group - resolve it to # the first element of the group - if fullMatches == 1 and partialMatches == 0: + if fullMatches == 1 and partialMatches <= 1: if fullPaths: return matchedGroupFiles[0] else: return matchedGroups[ 0] # The path appears to be part of # an incomplete group - this is - # potentially ambiguuuos, so give + # potentially ambiguous, so give # up (but see the partialMatches # clobber above). elif partialMatches > 0: