aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/builder/piggybacking.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/builder/piggybacking.py')
-rw-r--r--src/hydrilla/builder/piggybacking.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hydrilla/builder/piggybacking.py b/src/hydrilla/builder/piggybacking.py
index 7c03946..00186bc 100644
--- a/src/hydrilla/builder/piggybacking.py
+++ b/src/hydrilla/builder/piggybacking.py
@@ -98,7 +98,9 @@ class Piggybacked:
path = path.resolve()
- if not path.is_relative_to(root_path):
+ try:
+ path.relative_to(root_path)
+ except ValueError:
raise FileReferenceError(_('loading_{}_outside_piggybacked_dir')
.format(file_ref_name))