From 53e0526a1e8a69a84e6b748c3a986b6650cac16a Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Thu, 24 Oct 2013 00:15:22 +0300 Subject: [PATCH] Windows: Don't remove file associations if they aren't our own. --- src/preferences/preferences.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preferences/preferences.h b/src/preferences/preferences.h index f5606b27a..452ab81c8 100755 --- a/src/preferences/preferences.h +++ b/src/preferences/preferences.h @@ -1248,7 +1248,7 @@ public: settings.setValue("qBittorrent/shell/open/command/Default", command_str); settings.setValue("qBittorrent/Content Type/Default", "application/x-bittorrent"); settings.setValue("qBittorrent/DefaultIcon/Default", icon_str); - } else { + } else if (isTorrentFileAssocSet()) { settings.remove(".torrent/Default"); settings.remove(".torrent/Content Type"); settings.remove("qBittorrent/shell/Default"); @@ -1272,7 +1272,7 @@ public: settings.setValue("Magnet/DefaultIcon/Default", icon_str); settings.setValue("Magnet/shell/Default", "open"); settings.setValue("Magnet/shell/open/command/Default", command_str); - } else { + } else if (isMagnetLinkAssocSet()) { settings.remove("Magnet/Default"); settings.remove("Magnet/Content Type"); settings.remove("Magnet/URL Protocol");