mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 21:14:33 +00:00
Workaround space issues in file path
References: https://github.com/qbittorrent/qBittorrent/issues/5439#issuecomment-228616817 https://github.com/qbittorrent/qBittorrent/issues/5439#issuecomment-232214712
This commit is contained in:
parent
3846a5b875
commit
1e1471c7c6
@ -266,6 +266,7 @@ void Application::runExternalProgram(BitTorrent::TorrentHandle *const torrent) c
|
|||||||
GetSystemDirectoryW(systemPath, sizeof(systemPath) / sizeof(WCHAR));
|
GetSystemDirectoryW(systemPath, sizeof(systemPath) / sizeof(WCHAR));
|
||||||
return QString::fromWCharArray(systemPath) + QLatin1String("\\cmd.exe /C ");
|
return QString::fromWCharArray(systemPath) + QLatin1String("\\cmd.exe /C ");
|
||||||
}();
|
}();
|
||||||
|
program.prepend(QLatin1String("\"")).append(QLatin1String("\""));
|
||||||
program.prepend(cmdPath);
|
program.prepend(cmdPath);
|
||||||
const uint cmdMaxLength = 32768; // max length (incl. terminate char) for `lpCommandLine` in `CreateProcessW()`
|
const uint cmdMaxLength = 32768; // max length (incl. terminate char) for `lpCommandLine` in `CreateProcessW()`
|
||||||
if ((program.size() + 1) > cmdMaxLength) {
|
if ((program.size() + 1) > cmdMaxLength) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user