From c919dc6270534775e7f6a9a65db150d144e2aa20 Mon Sep 17 00:00:00 2001 From: Don HO Date: Wed, 28 Nov 2018 13:31:44 +0100 Subject: [PATCH] Notepad++ won't load plugins from %LOCALAPPDATA%\Notepad++\plugins\ anymore Notepad++ loads plugins only from 2 locations: 1. %PROGRAMDATA%\Notepad++\plugins\ - while Notepad++ installed on: %PROGRAMFILES%\Notepad++\ or wherever without doLocalConf.xml 2. \plugins\ - while Notepad++ installed on wherever (except in %PROGRAMFILES%\Notepad++\) with doLocalConf.xml --- PowerEditor/bin/pluginsForAllUsers_dummy.xml | 0 PowerEditor/src/Parameters.cpp | 17 ----------------- PowerEditor/src/Parameters.h | 2 -- 3 files changed, 19 deletions(-) delete mode 100644 PowerEditor/bin/pluginsForAllUsers_dummy.xml diff --git a/PowerEditor/bin/pluginsForAllUsers_dummy.xml b/PowerEditor/bin/pluginsForAllUsers_dummy.xml deleted file mode 100644 index e69de29bb..000000000 diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 418158625..83ab510ff 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -995,11 +995,6 @@ bool NppParameters::load() // Test if localConf.xml exist _isLocal = (PathFileExists(localConfPath.c_str()) == TRUE); - generic_string pluginsForAllUserPath(_nppPath); - PathAppend(pluginsForAllUserPath, pluginsForAllUsersFile); - if (!PathFileExists(pluginsForAllUserPath.c_str())) - pluginsForAllUserPath = TEXT(""); - // Under vista and windows 7, the usage of doLocalConf.xml is not allowed // if Notepad++ is installed in "program files" directory, because of UAC if (_isLocal) @@ -1035,18 +1030,6 @@ bool NppParameters::load() if (!PathFileExists(_userPath.c_str())) ::CreateDirectory(_userPath.c_str(), NULL); - _localAppdataNppDir = getSpecialFolderLocation(CSIDL_LOCAL_APPDATA); - PathAppend(_localAppdataNppDir, TEXT("Notepad++")); - nppPluginRootParent = _localAppdataNppDir; - - _pluginRootDir = _localAppdataNppDir; - PathAppend(_pluginRootDir, TEXT("plugins")); - } - - // pluginsForAllUser.xml > doLocalConf.xml - // overriding _pluginRootDir - if (!pluginsForAllUserPath.empty()) - { _pluginRootDir = getSpecialFolderLocation(CSIDL_COMMON_APPDATA); PathAppend(_pluginRootDir, TEXT("Notepad++")); nppPluginRootParent = _pluginRootDir; diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index ba2d5513a..18f7da15f 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -1493,7 +1493,6 @@ public: generic_string getNppPath() const {return _nppPath;}; generic_string getContextMenuPath() const {return _contextMenuPath;}; const TCHAR * getAppDataNppDir() const {return _appdataNppDir.c_str();}; - const TCHAR * getLocalAppDataNppDir() const { return _localAppdataNppDir.c_str(); }; const TCHAR * getPluginRootDir() const { return _pluginRootDir.c_str(); }; const TCHAR * getWorkingDir() const {return _currentDirectory.c_str();}; const TCHAR * getWorkSpaceFilePath(int i) const { @@ -1725,7 +1724,6 @@ private: generic_string _userPath; generic_string _stylerPath; generic_string _appdataNppDir; // sentinel of the absence of "doLocalConf.xml" : (_appdataNppDir == TEXT(""))?"doLocalConf.xml present":"doLocalConf.xml absent" - generic_string _localAppdataNppDir; // "%LOCALAPPDATA%\Notepad++" generic_string _pluginRootDir; generic_string _currentDirectory; generic_string _workSpaceFilePathes[3];