1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 15:54:57 +00:00

fix: unnamed placeholders in create.cc (#3848)

This commit is contained in:
Charles Kerr 2022-09-28 10:22:58 -05:00 committed by GitHub
parent 1b641b660e
commit 31ce989334
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,6 +131,7 @@ std::string tr_getcwd()
{ {
tr_error* error = nullptr; tr_error* error = nullptr;
auto cur = tr_sys_dir_get_current(&error); auto cur = tr_sys_dir_get_current(&error);
if (error != nullptr)
{ {
fprintf(stderr, "getcwd error: \"%s\"", error->message); fprintf(stderr, "getcwd error: \"%s\"", error->message);
tr_error_free(error); tr_error_free(error);
@ -222,14 +223,14 @@ int tr_main(int argc, char* argv[])
} }
fmt::print( fmt::print(
ngettext("{:d} files, {:s}\n", "{:d} file, {:s}\n", builder.fileCount()), ngettext("{file_count:L} files, {total_size}\n", "{file_count:L} file, {total_size}\n", builder.fileCount()),
builder.fileCount(), fmt::arg("file_count", builder.fileCount()),
tr_formatter_size_B(builder.totalSize())); fmt::arg("total_size", tr_formatter_size_B(builder.totalSize())));
fmt::print( fmt::print(
ngettext("{:d} pieces, {:s} each\n", "{:d} piece, {:s}\n", builder.pieceCount()), ngettext("{piece_count:L} pieces, {piece_size} each\n", "{piece_count:L} piece, {piece_size}\n", builder.pieceCount()),
builder.pieceCount(), fmt::arg("piece_count", builder.pieceCount()),
tr_formatter_size_B(builder.pieceSize())); fmt::arg("piece_size", tr_formatter_size_B(builder.pieceSize())));
if (!std::empty(options.comment)) if (!std::empty(options.comment))
{ {