Changeset View
Changeset View
Standalone View
Standalone View
kerfuffle/jobs.cpp
Show First 20 Lines • Show All 422 Lines • ▼ Show 20 Line(s) | 396 | { | |||
---|---|---|---|---|---|
423 | } | 423 | } | ||
424 | } | 424 | } | ||
425 | 425 | | |||
426 | void BatchExtractJob::setupDestination() | 426 | void BatchExtractJob::setupDestination() | ||
427 | { | 427 | { | ||
428 | const bool isSingleFolderRPM = (archive()->isSingleFolder() && | 428 | const bool isSingleFolderRPM = (archive()->isSingleFolder() && | ||
429 | (archive()->mimeType().name() == QLatin1String("application/x-rpm"))); | 429 | (archive()->mimeType().name() == QLatin1String("application/x-rpm"))); | ||
430 | 430 | | |||
431 | if (m_autoSubfolder && (!archive()->isSingleFolder() || isSingleFolderRPM)) { | 431 | if (m_autoSubfolder && (archive()->hasMultipleTopLevelEntries() || isSingleFolderRPM)) { | ||
432 | const QDir d(m_destination); | 432 | const QDir d(m_destination); | ||
433 | QString subfolderName = archive()->subfolderName(); | 433 | QString subfolderName = archive()->subfolderName(); | ||
434 | 434 | | |||
435 | // Special case for single folder RPM archives. | 435 | // Special case for single folder RPM archives. | ||
436 | // We don't want the autodetected folder to have a meaningless "usr" name. | 436 | // We don't want the autodetected folder to have a meaningless "usr" name. | ||
437 | if (isSingleFolderRPM && subfolderName == QLatin1String("usr")) { | 437 | if (isSingleFolderRPM && subfolderName == QLatin1String("usr")) { | ||
438 | qCDebug(ARK) << "Detected single folder RPM archive. Using archive basename as subfolder name"; | 438 | qCDebug(ARK) << "Detected single folder RPM archive. Using archive basename as subfolder name"; | ||
439 | subfolderName = QFileInfo(archive()->fileName()).completeBaseName(); | 439 | subfolderName = QFileInfo(archive()->fileName()).completeBaseName(); | ||
▲ Show 20 Lines • Show All 413 Lines • Show Last 20 Lines |