mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Make sure mod paths are always absolute
This commit is contained in:
parent
d0d7c11fe1
commit
903d13ffff
3 changed files with 8 additions and 4 deletions
|
@ -167,6 +167,7 @@ std::map<std::string, ModSpec> getModsInPath(
|
|||
|
||||
mod_path.clear();
|
||||
mod_path.append(path).append(DIR_DELIM).append(modname);
|
||||
mod_path = fs::AbsolutePath(mod_path);
|
||||
|
||||
mod_virtual_path.clear();
|
||||
// Intentionally uses / to keep paths same on different platforms
|
||||
|
@ -174,7 +175,7 @@ std::map<std::string, ModSpec> getModsInPath(
|
|||
|
||||
ModSpec spec(modname, mod_path, part_of_modpack, mod_virtual_path);
|
||||
parseModContents(spec);
|
||||
result.insert(std::make_pair(modname, spec));
|
||||
result[modname] = std::move(spec);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue