mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 18:56:08 +03: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
f2d5ba2907
commit
409e877f8a
1 changed files with 1 additions and 0 deletions
|
@ -266,6 +266,7 @@ void Application::runExternalProgram(BitTorrent::TorrentHandle *const torrent) c
|
|||
GetSystemDirectoryW(systemPath, sizeof(systemPath) / sizeof(WCHAR));
|
||||
return QString::fromWCharArray(systemPath) + QLatin1String("\\cmd.exe /C ");
|
||||
}();
|
||||
program.prepend(QLatin1String("\"")).append(QLatin1String("\""));
|
||||
program.prepend(cmdPath);
|
||||
const uint cmdMaxLength = 32768; // max length (incl. terminate char) for `lpCommandLine` in `CreateProcessW()`
|
||||
if ((program.size() + 1) > cmdMaxLength) {
|
||||
|
|
Loading…
Reference in a new issue