diff --git a/src/app/application.cpp b/src/app/application.cpp index 332082f5c..30072668f 100644 --- a/src/app/application.cpp +++ b/src/app/application.cpp @@ -139,7 +139,7 @@ void Application::torrentFinished(BitTorrent::TorrentHandle *const torrent) // AutoRun program if (pref->isAutoRunEnabled()) { - QString program = pref->getAutoRunProgram().trimmed(); + QString program = pref->getAutoRunProgram(); // Replace %f by torrent path program.replace("%f", torrent->savePathParsed()); // Replace %n by torrent name diff --git a/src/gui/options_imp.cpp b/src/gui/options_imp.cpp index 4b76ae595..8400bcedf 100644 --- a/src/gui/options_imp.cpp +++ b/src/gui/options_imp.cpp @@ -411,7 +411,7 @@ void options_imp::saveOptions() { pref->setMailNotificationSMTPUsername(mailNotifUsername->text()); pref->setMailNotificationSMTPPassword(mailNotifPassword->text()); pref->setAutoRunEnabled(autoRunBox->isChecked()); - pref->setAutoRunProgram(autoRun_txt->text()); + pref->setAutoRunProgram(autoRun_txt->text().trimmed()); pref->setActionOnDblClOnTorrentDl(getActionOnDblClOnTorrentDl()); pref->setActionOnDblClOnTorrentFn(getActionOnDblClOnTorrentFn()); // End Downloads preferences