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. <NPP_INST_DIR>\plugins\ - while Notepad++ installed on wherever (except in %PROGRAMFILES%\Notepad++\) with doLocalConf.xml
pull/5069/head
Don HO 6 years ago
parent 5df59ba2fc
commit c919dc6270

@ -995,11 +995,6 @@ bool NppParameters::load()
// Test if localConf.xml exist // Test if localConf.xml exist
_isLocal = (PathFileExists(localConfPath.c_str()) == TRUE); _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 // 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 Notepad++ is installed in "program files" directory, because of UAC
if (_isLocal) if (_isLocal)
@ -1035,18 +1030,6 @@ bool NppParameters::load()
if (!PathFileExists(_userPath.c_str())) if (!PathFileExists(_userPath.c_str()))
::CreateDirectory(_userPath.c_str(), NULL); ::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); _pluginRootDir = getSpecialFolderLocation(CSIDL_COMMON_APPDATA);
PathAppend(_pluginRootDir, TEXT("Notepad++")); PathAppend(_pluginRootDir, TEXT("Notepad++"));
nppPluginRootParent = _pluginRootDir; nppPluginRootParent = _pluginRootDir;

@ -1493,7 +1493,6 @@ public:
generic_string getNppPath() const {return _nppPath;}; generic_string getNppPath() const {return _nppPath;};
generic_string getContextMenuPath() const {return _contextMenuPath;}; generic_string getContextMenuPath() const {return _contextMenuPath;};
const TCHAR * getAppDataNppDir() const {return _appdataNppDir.c_str();}; 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 * getPluginRootDir() const { return _pluginRootDir.c_str(); };
const TCHAR * getWorkingDir() const {return _currentDirectory.c_str();}; const TCHAR * getWorkingDir() const {return _currentDirectory.c_str();};
const TCHAR * getWorkSpaceFilePath(int i) const { const TCHAR * getWorkSpaceFilePath(int i) const {
@ -1725,7 +1724,6 @@ private:
generic_string _userPath; generic_string _userPath;
generic_string _stylerPath; generic_string _stylerPath;
generic_string _appdataNppDir; // sentinel of the absence of "doLocalConf.xml" : (_appdataNppDir == TEXT(""))?"doLocalConf.xml present":"doLocalConf.xml absent" 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 _pluginRootDir;
generic_string _currentDirectory; generic_string _currentDirectory;
generic_string _workSpaceFilePathes[3]; generic_string _workSpaceFilePathes[3];

Loading…
Cancel
Save