mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-01 21:42:31 +01:00
Assume .jpg extension for logo
Should fix core dump caused by failing to get file extension for logo
This commit is contained in:
parent
e3f404bf5b
commit
586b0b5177
@ -82,8 +82,13 @@ void gameDetails::makeFilepaths(const DirectoryConfig& config)
|
|||||||
std::string filepath;
|
std::string filepath;
|
||||||
std::string directory = config.sDirectory + "/" + config.sGameSubdir + "/";
|
std::string directory = config.sDirectory + "/" + config.sGameSubdir + "/";
|
||||||
std::string subdir;
|
std::string subdir;
|
||||||
|
std::string logo_ext = ".jpg"; // Assume jpg
|
||||||
|
|
||||||
|
if (this->logo.rfind(".") != std::string::npos)
|
||||||
|
logo_ext = this->logo.substr(this->logo.rfind("."));
|
||||||
|
|
||||||
this->serialsFilepath = Util::makeFilepath(directory, "serials.txt", this->gamename, subdir, 0);
|
this->serialsFilepath = Util::makeFilepath(directory, "serials.txt", this->gamename, subdir, 0);
|
||||||
this->logoFilepath = Util::makeFilepath(directory, "logo" + this->logo.substr(this->logo.rfind(".")), this->gamename, subdir, 0);
|
this->logoFilepath = Util::makeFilepath(directory, "logo" + logo_ext, this->gamename, subdir, 0);
|
||||||
this->changelogFilepath = Util::makeFilepath(directory, "changelog_" + gamename + ".html", this->gamename, subdir, 0);
|
this->changelogFilepath = Util::makeFilepath(directory, "changelog_" + gamename + ".html", this->gamename, subdir, 0);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < this->installers.size(); ++i)
|
for (unsigned int i = 0; i < this->installers.size(); ++i)
|
||||||
@ -118,7 +123,7 @@ void gameDetails::makeFilepaths(const DirectoryConfig& config)
|
|||||||
{
|
{
|
||||||
subdir = config.bSubDirectories ? config.sDLCSubdir + "/" + config.sInstallersSubdir : "";
|
subdir = config.bSubDirectories ? config.sDLCSubdir + "/" + config.sInstallersSubdir : "";
|
||||||
this->dlcs[i].serialsFilepath = Util::makeFilepath(directory, "serials.txt", this->gamename, subdir, 0);
|
this->dlcs[i].serialsFilepath = Util::makeFilepath(directory, "serials.txt", this->gamename, subdir, 0);
|
||||||
this->dlcs[i].logoFilepath = Util::makeFilepath(directory, "logo" + this->logo.substr(this->logo.rfind(".")), this->gamename, subdir, 0);
|
this->dlcs[i].logoFilepath = Util::makeFilepath(directory, "logo" + logo_ext, this->gamename, subdir, 0);
|
||||||
this->dlcs[i].changelogFilepath = Util::makeFilepath(directory, "changelog_" + this->dlcs[i].gamename + ".html", this->gamename, subdir, 0);
|
this->dlcs[i].changelogFilepath = Util::makeFilepath(directory, "changelog_" + this->dlcs[i].gamename + ".html", this->gamename, subdir, 0);
|
||||||
for (unsigned int j = 0; j < this->dlcs[i].installers.size(); ++j)
|
for (unsigned int j = 0; j < this->dlcs[i].installers.size(); ++j)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user