diff options
-rwxr-xr-x | ranger/config/commands.py | 2 | ||||
-rw-r--r-- | ranger/container/settings.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index d1d84e91..1bd6f96f 100755 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -506,7 +506,7 @@ class setlocal(set_): if path is None: path = self._re_shift(self.PATH_RE_UNQUOTED.match(self.arg(1))) if path is None and self.fm.thisdir: - path = self.fm.thisdir.path + path = "^" + re.escape(self.fm.thisdir.path) + "$" if not path: return diff --git a/ranger/container/settings.py b/ranger/container/settings.py index e083c5ac..80250d4f 100644 --- a/ranger/container/settings.py +++ b/ranger/container/settings.py @@ -281,7 +281,7 @@ class Settings(SignalDispatcher, FileManagerAware): if path: if path not in self._localsettings: try: - regex = re.compile(re.escape(path)) + regex = re.compile(path) except re.error: # Bad regular expression return self._localregexes[path] = regex |