Save leader image paths with forward slashes

Backslashes in file paths aren't supported after commit 1b9c07e, and
saving them with backslashes prevents leader images from showing.
This commit is contained in:
Jyrki Vesterinen 2017-10-28 20:02:04 +03:00
parent c57b9a8f90
commit a6df1750d1

View file

@ -1326,17 +1326,17 @@ std::string get_independent_image_path(const std::string &filename)
path full_path(get_binary_file_location("images", filename));
if (full_path.empty())
return full_path.string();
return full_path.generic_string();
path partial = subtract_path(full_path, get_user_data_path());
if (!partial.empty())
return partial.string();
return partial.generic_string();
partial = subtract_path(full_path, game_config::path);
if (!partial.empty())
return partial.string();
return partial.generic_string();
return full_path.string();
return full_path.generic_string();
}
std::string get_program_invocation(const std::string &program_name)