From ec8b8bdb8d1d454e69836fcb62376536a3d49809 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 10 Aug 2025 04:55:13 +0100 Subject: [PATCH] IOS/FS: add safety assert This is to prevent someone (me) from accidentally deleting their entire /tmp directory just by not initializing the config system correctly. --- Source/Core/Core/IOS/FS/HostBackend/FS.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/Core/IOS/FS/HostBackend/FS.cpp b/Source/Core/Core/IOS/FS/HostBackend/FS.cpp index 96ce91b275..56fb44859c 100644 --- a/Source/Core/Core/IOS/FS/HostBackend/FS.cpp +++ b/Source/Core/Core/IOS/FS/HostBackend/FS.cpp @@ -43,6 +43,8 @@ HostFileSystem::HostFilename HostFileSystem::BuildFilename(const std::string& wi } } + ASSERT(!m_root_path.empty()); + if (wii_path.starts_with("/")) return HostFilename{m_root_path + Common::EscapePath(wii_path), false};