mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 15:15:37 +00:00
Added support for using the tilde symbol for ROM path tags in es_systems.xml
This commit is contained in:
parent
0266a6e7e6
commit
ee1a0f7cd3
|
@ -483,6 +483,9 @@ bool SystemData::loadConfig()
|
||||||
#endif
|
#endif
|
||||||
path = Utils::String::replace(path, "//", "/");
|
path = Utils::String::replace(path, "//", "/");
|
||||||
|
|
||||||
|
// In case ~ is used, expand it to the home directory path.
|
||||||
|
path = Utils::FileSystem::expandHomePath(path);
|
||||||
|
|
||||||
// Check that the ROM directory for the system is valid or otherwise abort the
|
// Check that the ROM directory for the system is valid or otherwise abort the
|
||||||
// processing.
|
// processing.
|
||||||
if (!Utils::FileSystem::exists(path)) {
|
if (!Utils::FileSystem::exists(path)) {
|
||||||
|
|
|
@ -464,10 +464,7 @@ namespace Utils
|
||||||
std::string expandHomePath(const std::string& path)
|
std::string expandHomePath(const std::string& path)
|
||||||
{
|
{
|
||||||
// Expand home path if ~ is used.
|
// Expand home path if ~ is used.
|
||||||
std::string expandedPath = path;
|
return Utils::String::replace(path, "~", Utils::FileSystem::getHomePath());
|
||||||
|
|
||||||
expandedPath = Utils::String::replace(path, "~", Utils::FileSystem::getHomePath());
|
|
||||||
return expandedPath;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string resolveRelativePath(const std::string& path,
|
std::string resolveRelativePath(const std::string& path,
|
||||||
|
|
Loading…
Reference in a new issue