summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-06-11 22:23:23 +0200
committerGitHub <noreply@github.com>2021-06-11 22:23:23 +0200
commit58180f9fa89822cc30e201d3ab71dc4055593918 (patch)
treebdfaa7297a91a1107e90e72bba0843a91efdf37e /src
parentMerge pull request #6422 from FernandoS27/i-am-the-senate (diff)
parentyuzu: main: Ensure enough space is available for RomFS dumping (diff)
downloadyuzu-58180f9fa89822cc30e201d3ab71dc4055593918.tar
yuzu-58180f9fa89822cc30e201d3ab71dc4055593918.tar.gz
yuzu-58180f9fa89822cc30e201d3ab71dc4055593918.tar.bz2
yuzu-58180f9fa89822cc30e201d3ab71dc4055593918.tar.lz
yuzu-58180f9fa89822cc30e201d3ab71dc4055593918.tar.xz
yuzu-58180f9fa89822cc30e201d3ab71dc4055593918.tar.zst
yuzu-58180f9fa89822cc30e201d3ab71dc4055593918.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 19339ff2d..be8933c5c 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1946,6 +1946,18 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa
const auto full = res == selections.constFirst();
const auto entry_size = CalculateRomFSEntrySize(extracted, full);
+ // The minimum required space is the size of the extracted RomFS + 1 GiB
+ const auto minimum_free_space = extracted->GetSize() + 0x40000000;
+
+ if (full && Common::FS::GetFreeSpaceSize(path) < minimum_free_space) {
+ QMessageBox::warning(this, tr("RomFS Extraction Failed!"),
+ tr("There is not enough free space at %1 to extract the RomFS. Please "
+ "free up space or select a different dump directory at "
+ "Emulation > Configure > System > Filesystem > Dump Root")
+ .arg(QString::fromStdString(path)));
+ return;
+ }
+
QProgressDialog progress(tr("Extracting RomFS..."), tr("Cancel"), 0,
static_cast<s32>(entry_size), this);
progress.setWindowModality(Qt::WindowModal);