error handling in make_torrent

This commit is contained in:
Arvid Norberg 2009-11-30 00:40:36 +00:00
parent 60aae18493
commit 5b039a8982
1 changed files with 5 additions and 0 deletions

View File

@ -140,6 +140,11 @@ int main(int argc, char* argv[])
std::string full_path = libtorrent::complete(argv[1]);
add_files(fs, full_path, file_filter);
if (fs.num_files() == 0)
{
fputs("no files specified.\n", stderr);
return 1;
}
create_torrent t(fs, piece_size, pad_file_limit, flags);
for (std::vector<std::string>::iterator i = trackers.begin()