fix: restore portable file path check (#6853)

* chore: change to snake_case naming

* fix: restore portable file path check

* fix: macosx build
This commit is contained in:
Yat Ho
2024-05-25 23:08:53 +08:00
committed by GitHub
parent adc405e5be
commit 9748f42c5a
14 changed files with 97 additions and 89 deletions

View File

@@ -217,11 +217,11 @@ int tr_main(int argc, char* argv[])
for (tr_file_index_t i = 0; i < n_files; ++i)
{
auto const& path = builder.path(i);
if (!tr_torrent_files::isSubpathPortable(path))
if (!tr_torrent_files::is_subpath_sanitized(path, false))
{
fmt::print(stderr, "WARNING\n");
fmt::print(stderr, "filename \"{:s}\" may not be portable on all systems.\n", path);
fmt::print(stderr, "consider \"{:s}\" instead.\n", tr_torrent_files::makeSubpathPortable(path));
fmt::print(stderr, "consider \"{:s}\" instead.\n", tr_torrent_files::sanitize_subpath(path, false));
}
}