diff options
author | hut <hut@lavabit.com> | 2012-04-13 14:52:08 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-04-13 14:52:08 +0200 |
commit | 90b176ed65c0a44f118be2ab92c592df440503b2 (patch) | |
tree | 6ad4a7dfeb022fe1f35e9e98cb10228c934adbe3 | |
parent | 1e2d7ced68ffec4a0fdebfa4e2fecad765a79c81 (diff) | |
download | ranger-90b176ed65c0a44f118be2ab92c592df440503b2.tar.gz |
ext.rifle: wrap extension regexp in brackets so X|ar|Y doesn't match rar
-rwxr-xr-x | ranger/ext/rifle.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py index 474aa021..cc8dcaff 100755 --- a/ranger/ext/rifle.py +++ b/ranger/ext/rifle.py @@ -132,7 +132,7 @@ class Rifle(object): if function == 'ext': extension = os.path.basename(files[0]).rsplit('.', 1)[-1] - return bool(re.search('^' + argument + '$', extension)) + return bool(re.search('^(' + argument + ')$', extension)) if function == 'name': return bool(re.search(argument, os.path.basename(files[0]))) if function == 'path': |