summaryrefslogtreecommitdiff
path: root/fs/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'fs/errors.py')
-rw-r--r--fs/errors.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/errors.py b/fs/errors.py
index 38cb4b7..93f8905 100644
--- a/fs/errors.py
+++ b/fs/errors.py
@@ -188,6 +188,11 @@ class NoMMapError(ResourceError):
default_message = "Can't get mmap for %(path)s"
+class BackReferenceError(FSError, ValueError):
+ """Exception raised when too many backrefs exist in a path (ex: '/..', '/docs/../..')."""
+ default_message = "Too many backrefs in '%(path)s'"
+
+
def convert_fs_errors(func):
"""Function wrapper to convert FSError instances into OSError."""
@wraps(func)