mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03:00
Merge pull request #2035 from pmzqla/torrentpath
Allow relative torrent paths when qBittorrent is already running
This commit is contained in:
commit
dd711bf377
1 changed files with 6 additions and 1 deletions
|
@ -232,8 +232,13 @@ int main(int argc, char *argv[]) {
|
|||
QStringList torrentCmdLine = app.arguments();
|
||||
//Pass program parameters if any
|
||||
QString message;
|
||||
QFileInfo torrentPath;
|
||||
for (int a = 1; a < torrentCmdLine.size(); ++a) {
|
||||
if (torrentCmdLine[a].startsWith("--")) continue;
|
||||
torrentPath.setFile(torrentCmdLine[a]);
|
||||
if (torrentPath.exists())
|
||||
message += torrentPath.absoluteFilePath();
|
||||
else
|
||||
message += torrentCmdLine[a];
|
||||
if (a < argc-1)
|
||||
message += "|";
|
||||
|
|
Loading…
Reference in a new issue