mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-07 16:24:15 +08:00
fix preview url path on Linux
This commit is contained in:
parent
6fcd47cd72
commit
0d35336c57
@ -969,7 +969,16 @@ static std::string get_mod_preview_url(const std::string &previewFileName, const
|
|||||||
} else {
|
} else {
|
||||||
auto settings_folder = std::string(Local_Storage::get_game_settings_path());
|
auto settings_folder = std::string(Local_Storage::get_game_settings_path());
|
||||||
std::replace(settings_folder.begin(), settings_folder.end(), '\\', '/');
|
std::replace(settings_folder.begin(), settings_folder.end(), '\\', '/');
|
||||||
return "file:///" + settings_folder + "mod_images/" + mod_id + "/" + previewFileName;
|
|
||||||
|
return
|
||||||
|
|
||||||
|
#if defined(__WINDOWS__)
|
||||||
|
"file:///"
|
||||||
|
#else // on Linux absolute paths start like this: /my/path, so the 3rd slash is already appended
|
||||||
|
"file://"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ settings_folder + "mod_images/" + mod_id + "/" + previewFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user