diff --git a/app/main.cpp b/app/main.cpp --- a/app/main.cpp +++ b/app/main.cpp @@ -191,7 +191,7 @@ i18n("The destination argument will be set to the path of the first file supplied."))); parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("a") << QStringLiteral("autosubfolder"), - i18n("Archive contents will be read, and if detected to not be a single folder archive, a subfolder with the name of the archive will be created."))); + i18n("Archive contents will be read, and if detected to not be a single folder or a single file archive, a subfolder with the name of the archive will be created."))); parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("m") << QStringLiteral("mimetypes"), i18n("List supported MIME types."))); diff --git a/autotests/app/batchextracttest.cpp b/autotests/app/batchextracttest.cpp --- a/autotests/app/batchextracttest.cpp +++ b/autotests/app/batchextracttest.cpp @@ -90,7 +90,7 @@ QTest::newRow("single-file, autosubfolder") << QFINDTESTDATA("data/test.txt.gz") << true - << 2; + << 1; } void BatchExtractTest::testBatchExtraction() diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp --- a/kerfuffle/jobs.cpp +++ b/kerfuffle/jobs.cpp @@ -428,7 +428,7 @@ const bool isSingleFolderRPM = (archive()->isSingleFolder() && (archive()->mimeType().name() == QLatin1String("application/x-rpm"))); - if (m_autoSubfolder && (!archive()->isSingleFolder() || isSingleFolderRPM)) { + if (m_autoSubfolder && (archive()->hasMultipleTopLevelEntries() || isSingleFolderRPM)) { const QDir d(m_destination); QString subfolderName = archive()->subfolderName();