Prevent the use of --output-file when downloading multiple files

This commit is contained in:
Sandy Carter 2015-08-14 23:42:00 -04:00 committed by Sude
parent b6d07f5343
commit 5c9488fc13

View File

@ -336,6 +336,12 @@ int main(int argc, char *argv[])
if (i->compare(0, GlobalConstants::PROTOCOL_PREFIX.length(), GlobalConstants::PROTOCOL_PREFIX) == 0)
config.sFileIdString = *i;
if (!config.sOutputFilename.empty() && config.sFileIdString.find(',') != std::string::npos)
{
std::cerr << "Cannot specify an output file name when downloading multiple files." << std::endl;
return 1;
}
// Override cover option
if (bNoCover)
config.bCover = false;