Skip to content

Commit a0f677d

Browse files
authored
fix for backref error (#258)
1 parent e2106d0 commit a0f677d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [2.2.2] - Unreleased
9+
10+
### Fixed
11+
12+
- IllegalBackReference had mangled error message
13+
814
## [2.2.1] - 2018-01-06
915

1016
### Fixed

fs/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version, used in module and setup.py.
22
"""
3-
__version__ = "2.2.1"
3+
__version__ = "2.2.2a0"

fs/path.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def normpath(path):
6666
>>> normpath("foo/../../bar")
6767
Traceback (most recent call last)
6868
...
69-
IllegalBackReference: Too many backrefs in 'foo/../../bar'
69+
IllegalBackReference: path 'foo/../../bar' contains back-references outside of filesystem"
7070
7171
"""
7272
if path in "/":
@@ -86,7 +86,7 @@ def normpath(path):
8686
else:
8787
components.append(component)
8888
except IndexError:
89-
raise IllegalBackReference("Too many backrefs in '{}'".format(path))
89+
raise IllegalBackReference(path)
9090
return prefix + "/".join(components)
9191

9292

0 commit comments

Comments
 (0)