mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Make sure mod paths are always absolute
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user