mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
WINDOWS: Fix magnet link association. Closes #1952.
This commit is contained in:
parent
1fd2dce0bd
commit
d159117965
1 changed files with 3 additions and 3 deletions
|
@ -1277,7 +1277,7 @@ public:
|
||||||
return false;
|
return false;
|
||||||
QString assoc_exe = exe_reg.cap(1);
|
QString assoc_exe = exe_reg.cap(1);
|
||||||
qDebug("exe: %s", qPrintable(assoc_exe));
|
qDebug("exe: %s", qPrintable(assoc_exe));
|
||||||
if (assoc_exe.compare(qApp->applicationFilePath(), Qt::CaseInsensitive) != 0)
|
if (assoc_exe.compare(qApp->applicationFilePath().replace("/", "\\"), Qt::CaseInsensitive) != 0)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1303,8 +1303,8 @@ public:
|
||||||
|
|
||||||
// Magnet association
|
// Magnet association
|
||||||
if (set) {
|
if (set) {
|
||||||
const QString command_str = "\""+qApp->applicationFilePath()+"\" \"%1\"";
|
const QString command_str = "\""+qApp->applicationFilePath().replace("/", "\\")+"\" \"%1\"";
|
||||||
const QString icon_str = "\""+qApp->applicationFilePath()+"\",1";
|
const QString icon_str = "\""+qApp->applicationFilePath().replace("/", "\\")+"\",1";
|
||||||
|
|
||||||
settings.setValue("magnet/Default", "URL:Magnet link");
|
settings.setValue("magnet/Default", "URL:Magnet link");
|
||||||
settings.setValue("magnet/Content Type", "application/x-magnet");
|
settings.setValue("magnet/Content Type", "application/x-magnet");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue