From ec694c7806b17203a4ac200607242fdc9d632215 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Thu, 15 Jul 2010 13:31:30 +0000 Subject: [PATCH] Fix torrent association detection on Win32 --- src/preferences.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/preferences.h b/src/preferences.h index 7f1f041ca..3510890ab 100644 --- a/src/preferences.h +++ b/src/preferences.h @@ -980,12 +980,14 @@ public: static bool isFileAssocOk() { QSettings settings("HKEY_CLASSES_ROOT", QSettings::NativeFormat); - if(settings.value(".torrent\\Default").toString() != "qBittorrent") { + if(settings.value(".torrent\\Default").toString() != "qBittorrent" && settings.value(".torrent/Default").toString() != "qBittorrent") { qDebug(".torrent != qBittorrent"); return false; } qDebug("Checking shell command"); QString shell_command = settings.value("qBittorrent\\shell\\open\\command\\Default", "").toString(); + if(shell_command.isEmpty()) + shell_command = settings.value("qBittorrent/shell/open/command/Default", "").toString(); qDebug("Shell command is: %s", qPrintable(shell_command)); QRegExp exe_reg("\"([^\"]+)\".*"); if(exe_reg.indexIn(shell_command) < 0) @@ -996,6 +998,8 @@ public: return false; // Check magnet link assoc shell_command = settings.value("Magnet\\shell\\open\\command\\Default", "").toString(); + if(shell_command.isEmpty()) + shell_command = settings.value("Magnet/shell/open/command/Default", "").toString(); if(exe_reg.indexIn(shell_command) < 0) return false; assoc_exe = exe_reg.cap(1);