mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
feat: warn when creating torrents with nonportable filenames (#2695)
* feat: check new torrents for nonportable filenames * fix: parse torrents even if they have nonportable filenames in the info dict's 'file' string
This commit is contained in:
@@ -208,6 +208,14 @@ int tr_main(int argc, char* argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < b->fileCount; ++i)
|
||||
{
|
||||
if (auto const& file = b->files[i]; !file.is_portable)
|
||||
{
|
||||
fprintf(stderr, "WARNING: consider renaming nonportable filename \"%s\".\n", file.filename);
|
||||
}
|
||||
}
|
||||
|
||||
if (options.piecesize_kib != 0)
|
||||
{
|
||||
tr_metaInfoBuilderSetPieceSize(b, options.piecesize_kib * KiB);
|
||||
|
||||
Reference in New Issue
Block a user