diff --git a/SurrealEngine/Package/PackageManager.cpp b/SurrealEngine/Package/PackageManager.cpp index b19ad504..87a374f5 100644 --- a/SurrealEngine/Package/PackageManager.cpp +++ b/SurrealEngine/Package/PackageManager.cpp @@ -80,6 +80,9 @@ std::unique_ptr PackageManager::LoadMap(const std::string& path) // Only one of the above is most likely true. Lets begin with assuming its relative to the Maps folder. std::string name = FilePath::remove_extension(FilePath::last_component(path)); std::string absolute_path = FilePath::relative_to_absolute_from_system(FilePath::combine(launchInfo.gameRootFolder, "Maps"), path); + // Add the file extension if it is missing + if (!FilePath::has_extension(absolute_path, GetMapExtension().c_str())) + absolute_path += "." + GetMapExtension(); return std::make_unique(this, name, absolute_path); }