Skip to content

Commit

Permalink
DolphinQt2: Fix the file structure of extracted discs
Browse files Browse the repository at this point in the history
Now all the partitions won't be all jumbled up in one folder,
and the filesystem contents won't be mixed with system data.
  • Loading branch information
JosJuice committed May 5, 2018
1 parent cf40ebf commit 1a74de6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Source/Core/DolphinQt2/Config/FilesystemWidget.cpp
Expand Up @@ -181,8 +181,15 @@ void FilesystemWidget::ShowContextMenu(const QPoint&)
} }
else else
{ {
for (auto& p : m_volume->GetPartitions()) for (DiscIO::Partition& p : m_volume->GetPartitions())
ExtractPartition(p, folder); {
if (const std::optional<u32> partition_type = m_volume->GetPartitionType(p))
{
const std::string partition_name =
DiscIO::DirectoryNameForPartitionType(*partition_type);
ExtractPartition(p, folder + QChar(u'/') + QString::fromStdString(partition_name));
}
}
} }
}); });
break; break;
Expand Down Expand Up @@ -224,7 +231,7 @@ DiscIO::Partition FilesystemWidget::GetPartitionFromID(int id)


void FilesystemWidget::ExtractPartition(const DiscIO::Partition& partition, const QString& out) void FilesystemWidget::ExtractPartition(const DiscIO::Partition& partition, const QString& out)
{ {
ExtractDirectory(partition, QStringLiteral(""), out); ExtractDirectory(partition, QStringLiteral(""), out + QStringLiteral("/files"));
ExtractSystemData(partition, out); ExtractSystemData(partition, out);
} }


Expand Down

0 comments on commit 1a74de6

Please sign in to comment.