From f2f2dad4027aeea976309f9fe5d58206f3f8a3da Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Sun, 27 Jan 2013 20:09:12 +0200 Subject: [PATCH] Split removal of configuration files to 2 options. --- src/windows/installer-translations/english.nsi | 2 ++ src/windows/uninstaller.nsi | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/windows/installer-translations/english.nsi b/src/windows/installer-translations/english.nsi index 1ff59dbca..cfbe4c57e 100644 --- a/src/windows/installer-translations/english.nsi +++ b/src/windows/installer-translations/english.nsi @@ -29,3 +29,5 @@ LangString remove_registry ${LANG_ENGLISH} "Remove registry keys" LangString remove_conf ${LANG_ENGLISH} "Remove configuration files" ;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule" LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule" +;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data" +LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data" diff --git a/src/windows/uninstaller.nsi b/src/windows/uninstaller.nsi index 9f6e16a8e..8f3036929 100644 --- a/src/windows/uninstaller.nsi +++ b/src/windows/uninstaller.nsi @@ -69,11 +69,17 @@ Section "un.$(remove_firewall)" ; SectionEnd Section /o "un.$(remove_conf)" ;"un.Remove configuration files" + System::Call 'shell32::SHGetSpecialFolderPath(i $HWNDPARENT, t .r1, i ${CSIDL_APPDATA}, i0)i.r0' - RMDir /r "$1\qBittorrent" + RMDir /r "$1\qBittorrent" +SectionEnd + +Section /o "un.$(remove_cache)" + System::Call 'shell32::SHGetSpecialFolderPath(i $HWNDPARENT, t .r1, i ${CSIDL_LOCALAPPDATA}, i0)i.r0' RMDir /r "$1\qBittorrent\" + SectionEnd ;--------------------------------