Skip to content

Commit

Permalink
Don't truncate savefile names on disk (bug bug #23632)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Feb 29, 2016
1 parent 5c89770 commit 7adf43a
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/savegame.cpp
Expand Up @@ -22,6 +22,7 @@
#include "carryover.hpp"
#include "config_assign.hpp"
#include "format_time_summary.hpp"
#include "formatter.hpp"
#include "formula_string_utils.hpp"
#include "game_display.hpp"
#include "game_end_exceptions.hpp"
Expand Down Expand Up @@ -563,13 +564,7 @@ replay_savegame::replay_savegame(saved_game &gamestate, const compression::forma

void replay_savegame::create_filename()
{
std::stringstream stream;

const std::string ellipsed_name = font::make_text_ellipsis(gamestate().classification().label,
font::SIZE_NORMAL, 200);
stream << ellipsed_name << " " << _("replay");

set_filename(stream.str());
set_filename((formatter() << gamestate().classification().label << " " << _("replay")).str());
}

void replay_savegame::write_game(config_writer &out) {
Expand Down Expand Up @@ -647,15 +642,10 @@ ingame_savegame::ingame_savegame(saved_game &gamestate,

void ingame_savegame::create_filename()
{
std::stringstream stream;

const std::string ellipsed_name = font::make_text_ellipsis(gamestate().classification().label,
font::SIZE_NORMAL, 200);
stream << ellipsed_name << " " << _("Turn") << " " << gamestate().get_starting_pos()["turn_at"];
set_filename(stream.str());
set_filename((formatter() << gamestate().classification().label
<< " " << _("Turn") << " " << gamestate().get_starting_pos()["turn_at"]).str());
}


void ingame_savegame::write_game(config_writer &out) {
log_scope("write_game");

Expand Down

0 comments on commit 7adf43a

Please sign in to comment.