Ensure that the path defined in the core options is relative to the system directory

This commit is contained in:
Jesse Talavera 2024-03-19 19:42:42 -04:00
parent 5a9ceaaca9
commit 488402becb

View File

@ -892,6 +892,7 @@ bool MelonDsDs::RegisterCoreOptions() noexcept {
retro::debug("Found a DSi NAND image at \"{}\"", dsiNandPaths[i]); retro::debug("Found a DSi NAND image at \"{}\"", dsiNandPaths[i]);
string_view path = dsiNandPaths[i]; string_view path = dsiNandPaths[i];
path.remove_prefix(sysdir->size() + 1); path.remove_prefix(sysdir->size() + 1);
retro_assert(!path_is_absolute(path.data()));
dsiNandPathOption->values[i].value = path.data(); dsiNandPathOption->values[i].value = path.data();
dsiNandPathOption->values[i].label = nullptr; dsiNandPathOption->values[i].label = nullptr;
} }