@@ -307,7 +307,7 @@ bool WORLD::save( const bool is_conversion ) const
307307 }
308308
309309 if ( !is_conversion ) {
310- const auto savefile = folder_path () / PATH_INFO::worldoptions ();
310+ const cata_path savefile = folder_path () / PATH_INFO::worldoptions ();
311311 const bool saved = write_to_file ( savefile, [&]( std::ostream & fout ) {
312312 JsonOut jout ( fout );
313313
@@ -423,7 +423,7 @@ void worldfactory::init()
423423 if ( newworld->save ( true ) ) {
424424 const cata_path origin_path = old_world.folder_path ();
425425 // move files from origin_path into new world path
426- for ( auto &origin_file : get_files_from_path ( " ." , origin_path, false ) ) {
426+ for ( cata_path &origin_file : get_files_from_path ( " ." , origin_path, false ) ) {
427427 std::string filename = origin_file.get_relative_path ().filename ().generic_u8string ();
428428
429429 if ( rename_file ( origin_file, ( newworld->folder_path () / filename ) ) ) {
@@ -2153,15 +2153,15 @@ void worldfactory::delete_world( const std::string &worldname, const bool delete
21532153 auto end = std::remove_if ( file_paths.begin (), file_paths.end (), isForbidden );
21542154 file_paths.erase ( end, file_paths.end () );
21552155
2156- for ( auto &file_path : file_paths ) {
2156+ for ( cata_path &file_path : file_paths ) {
21572157 fs::path folder_path = file_path.get_unrelative_path ().parent_path ();
2158- while ( folder_path.filename () != worldname ) {
2158+ while ( folder_path.filename () != fs::u8path ( worldname ) ) {
21592159 directory_paths.insert ( folder_path );
21602160 folder_path = folder_path.parent_path ();
21612161 }
21622162 }
21632163
2164- for ( auto &file : file_paths ) {
2164+ for ( cata_path &file : file_paths ) {
21652165 remove_file ( file );
21662166 }
21672167
0 commit comments