Fix the hack for File::c_str to work (#1242)

This commit is contained in:
Rangi
2023-11-14 07:38:18 -05:00
committed by GitHub
parent cf62ff772f
commit 232416b30d
4 changed files with 33 additions and 28 deletions

View File

@@ -254,7 +254,7 @@ static std::vector<size_t> readAtFile(std::filesystem::path const &path,
std::vector<char> &argPool) {
File file;
if (!file.open(path, std::ios_base::in)) {
fatal("Error reading @%s: %s", file.c_str(path), strerror(errno));
fatal("Error reading @%s: %s", file.string(path).c_str(), strerror(errno));
}
// We only filter out `EOF`, but calling `isblank()` on anything else is UB!