diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:33:25 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:38:30 +0200 |
commit | b72442a0362a266990b5a8f7431ec708de1ff006 (patch) | |
tree | c414c0d7ecede2bdd02f51cd5813af3e3ad73620 /src/Cache.cpp | |
parent | 7713c01939b19b588e6e99d4b583447b9e2362f6 (diff) |
WIP: FIX p2p
Diffstat (limited to 'src/Cache.cpp')
-rw-r--r-- | src/Cache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp index bb87857..eecc790 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -351,9 +351,9 @@ namespace dchat string downloadLimitBytesStr = to_string(downloadLimitBytes); - std::string cmdUtf8 = "curl -L --silent -o '"; - cmdUtf8 += escapeCommand(filepath.string()); - cmdUtf8 += "' --max-filesize " + downloadLimitBytesStr + " --range 0-" + downloadLimitBytesStr + " --url '" + escapeCommand(url) + "'"; + std::string cmdUtf8 = "curl -L --silent -o "; + cmdUtf8 += escapeCommandArg(filepath.string()); + cmdUtf8 += " --max-filesize " + downloadLimitBytesStr + " --range 0-" + downloadLimitBytesStr + " --url " + escapeCommandArg(url); Process::string_type cmd = toNativeString(cmdUtf8); // TODO: Use this instead of curl on windows: certutil.exe -urlcache -split -f "https://url/to/file" path/and/name/to/save/as/file Process *process = new Process(cmd, toNativeString(""), nullptr, nullptr, false); |