mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 10:00:16 +02:00
FEXRootFSFetcher: Fixes curl downloading with spaces in the path
Since we're invoking curl directly, we don't need to wrap it in `sh -c` with this function. Fixes an issue where curl downloads to a non-escaped path weren't working. Now they do.
This commit is contained in:
1 parent
bba156a3c1
commit
47d79978ef
1 file changed
+6
-10
@@ -489,12 +489,9 @@ namespace WebFileFetcher {
|
||||
const static std::string DownloadURL = "https://rootfs.fex-emu.gg/RootFS_links.json";
|
||||
|
||||
std::string DownloadToString(const std::string &URL) {
|
||||
std::string BigArgs =
|
||||
fmt::format("curl {}", URL);
|
||||
std::vector<const char*> ExecveArgs = {
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
BigArgs.c_str(),
|
||||
"curl",
|
||||
URL.c_str(),
|
||||
nullptr,
|
||||
};
|
||||
|
||||
@@ -505,12 +502,11 @@ namespace WebFileFetcher {
|
||||
auto filename = URL.substr(URL.find_last_of('/') + 1);
|
||||
auto PathName = Path + filename;
|
||||
|
||||
std::string BigArgs =
|
||||
fmt::format("curl {} -o {}", URL, PathName);
|
||||
std::vector<const char*> ExecveArgs = {
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
BigArgs.c_str(),
|
||||
"curl",
|
||||
URL.c_str(),
|
||||
"-o",
|
||||
PathName.c_str(),
|
||||
nullptr,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user