mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-05 15:12:32 -06:00
WINDOWS: Fix magnet link association. Closes #1952.
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user