1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Fix bug where file extension can get added twice (#16720)

This commit is contained in:
Charles Machalow
2022-02-25 22:25:06 -08:00
committed by GitHub
parent 6406b18c98
commit 59c4beb3dd

View File

@@ -419,7 +419,7 @@ static u8string Browse(bool isSave)
{
// When the given save type was given, Windows still interprets a filename with a dot in its name as a custom extension,
// meaning files like "My Coaster v1.2" will not get the .td6 extension by default.
if (isSave && get_file_extension_type(path) != fileType)
if (isSave && get_file_extension_type(outPath) != fileType)
path_append_extension(outPath, extension.c_str(), std::size(outPath));
}