diff --git a/src/libexpr/primops/flakeref.cc b/src/libexpr/primops/flakeref.cc index c42616374..3c805eff8 100644 --- a/src/libexpr/primops/flakeref.cc +++ b/src/libexpr/primops/flakeref.cc @@ -134,7 +134,7 @@ FlakeRef::FlakeRef(const std::string & uri, bool allowRelative) data = d; } - else if (hasPrefix(uri, "/") || (allowRelative && (hasPrefix(uri, "./") || uri == "."))) { + else if (hasPrefix(uri, "/") || (allowRelative && (hasPrefix(uri, "./") || hasPrefix(uri, "../") || uri == "."))) { IsPath d; d.path = allowRelative ? absPath(uri) : canonPath(uri); data = d;