We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
read_file
1 parent 4cb5ab6 commit 64063dcCopy full SHA for 64063dc
src/core/json/json.cc
@@ -43,7 +43,12 @@ auto read_file(const std::filesystem::path &path)
43
std::make_error_code(std::errc::is_a_directory));
44
}
45
46
- std::ifstream stream{std::filesystem::canonical(path)};
+ std::ifstream stream{
47
+ // On Linux, FIFO files (like /dev/fd/XX due to process substitution)
48
+ // cannot be
49
+ // made canonical
50
+ // See https://github.com/sourcemeta/jsonschema/issues/252
51
+ std::filesystem::is_fifo(path) ? path : std::filesystem::canonical(path)};
52
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
53
assert(!stream.fail());
54
assert(stream.is_open());
0 commit comments