mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 12:44:59 +01:00
fix(files): terrain files named in another case are found on Linux
The terrain directive names .txtf/.btf files in lowercase, as the parser gives every token. The name is now taken as it is on disk, from the text file first, so the binary file is made next to the text and the editor's references and layers keep one name.
This commit is contained in:
@@ -1200,6 +1200,8 @@ include_terrain_file( std::string File, std::string &Includes, scene::scratch_da
|
||||
|
||||
replace_slashes( File );
|
||||
erase_extension( File );
|
||||
// the parser gives the name in lowercase, the files may be named in another case; the binary file is made next to the text
|
||||
File = FileStemOnDisk( Global.asCurrentSceneryPath, File, { ".txtf", ".btf" } );
|
||||
if( std::find( binary.terrain_textfiles.begin(), binary.terrain_textfiles.end(), File ) != binary.terrain_textfiles.end() ) {
|
||||
WriteLog( "Terrain file: " + File + " is already in use, ignored" );
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user