From c49f7b92076d110ca1549df85ed3f4d1135cd0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 10 Sep 2024 19:08:01 +0200 Subject: [PATCH] Sneak in a couple little fixes for savedata zip install --- Core/Util/GameManager.cpp | 4 ++++ UI/InstallZipScreen.cpp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/Util/GameManager.cpp b/Core/Util/GameManager.cpp index 433e280135..7c2045236c 100644 --- a/Core/Util/GameManager.cpp +++ b/Core/Util/GameManager.cpp @@ -238,6 +238,10 @@ bool CanExtractWithoutOverwrite(struct zip *z, const Path &destination, int maxO } for (int i = 0; i < numFiles; i++) { const char *fn = zip_get_name(z, i, 0); + if (endsWith(fn, "/")) { + // we don't care about directory overwrites, that's fine. + continue; + } Path p = destination / fn; if (File::Exists(p)) { INFO_LOG(Log::HLE, "Extract zip check: %s exists, can't extract without overwrite", p.ToVisualString().c_str()); diff --git a/UI/InstallZipScreen.cpp b/UI/InstallZipScreen.cpp index 2278a88002..30d4605619 100644 --- a/UI/InstallZipScreen.cpp +++ b/UI/InstallZipScreen.cpp @@ -125,7 +125,9 @@ void InstallZipScreen::CreateViews() { destFolders_.push_back(savedataDir); - leftColumn->Add(new NoticeView(NoticeLevel::WARN, di->T("Confirm Overwrite"), "")); + if (overwrite) { + leftColumn->Add(new NoticeView(NoticeLevel::WARN, di->T("Confirm Overwrite"), "")); + } int columnWidth = 300;