*: let libfmt quote strings

This commit is contained in:
Max Kellermann
2024-04-16 11:06:34 +02:00
parent 39c9e92f42
commit 0c1ecc96a8
71 changed files with 160 additions and 160 deletions

View File

@@ -27,7 +27,7 @@ struct ZzipDir {
explicit ZzipDir(Path path)
:dir(zzip_dir_open(NarrowPath(path), nullptr)) {
if (dir == nullptr)
throw FmtRuntimeError("Failed to open ZIP file {}",
throw FmtRuntimeError("Failed to open ZIP file {:?}",
path);
}
@@ -120,11 +120,11 @@ ZzipArchiveFile::OpenStream(const char *pathname,
const auto error = (zzip_error_t)zzip_error(dir->dir);
switch (error) {
case ZZIP_ENOENT:
throw FmtFileNotFound("Failed to open '{}' in ZIP file",
throw FmtFileNotFound("Failed to open {:?} in ZIP file",
pathname);
default:
throw FmtRuntimeError("Failed to open '{}' in ZIP file: {}",
throw FmtRuntimeError("Failed to open {:?} in ZIP file: {}",
pathname,
zzip_strerror(error));
}
@@ -145,7 +145,7 @@ ZzipInputStream::Read(std::unique_lock<Mutex> &, void *ptr, size_t read_size)
throw std::runtime_error("zzip_file_read() has failed");
if (nbytes == 0 && !IsEOF())
throw FmtRuntimeError("Unexpected end of file {} at {} of {}",
throw FmtRuntimeError("Unexpected end of file {:?} at {} of {}",
GetURI(), GetOffset(), GetSize());
offset = zzip_tell(file);