Is it normal to have PluginCache (some folders and files in them) at "%USERPROFILE%\AppData\Local\KeePass\PluginCache"?
KeePassProPortable is not even on but the folder is still there for the whole time.
You are here
[Closed] KeePassPro - PluginCache in AppData
By default, it is configured to use Data\PluginCache. Did you change something or manually move some files around?
The only thing I did is: I put KeePassHttp.plgx into "KeePassProPortable\App\KeePassPro\Plugins". It's a plugin for connecting Google Chrome with KeePassPro.
I tried reproducing this and the cache for KeePassHttp.plgx is saved to KeePassProPortable\Data\PluginCache as expected. Would you please explore to KeePassProPortable\Data\settings and open up your KeePass.config.xml file in Notepad++ or similar. Find the entry <PluginCachePath>
and see if it is properly set to <PluginCachePath>{APPDIR}\..\..\Data\PluginCache</PluginCachePath>
.
I don't have such an entry as:
PluginCachePath
The only entry which has Plugin in its name is:
PluginCompatibility
Did you at some point copy your own settings in? That entry is in the KeePass Pro Portable default settings on first launch.
Unfortunately I can't remember and cannot rule out such possibility. I have been using the portable version since 2019 but before that I used a regular version. I definately did copy the database so I might have also copied over the settings from the regular version to the portable one as well.
What should I do now? Remove the settings file and set it up like a fresh new installment? I can see PluginCachePath in the config file in DefaultData. Maybe I can just copy it over to my current config file? Unless my config file is not missing any other entries from the portable version. Are you aware of other portable-related entries in the config file?
Close KeePass Pro Portable. Open up the settings file you see in DefaultData. Find the PluginCachePath line and copy that whole line. Open up your existing one within Data. Paste that whole line just above the line </Application> and then save it. You should be good to go.
I did it just before you posted but I pasted PluginCachePath right after /TriggerSystem
line and before PluginCompatibility
line, so it is the same way as in the original config in DefaultData.
So far it works like a charm. PluginCache folder was created at "KeePassProPortable\Data".So I deleted the PluginCache located at "%USERPROFILE%\AppData\Local\KeePass". The folder was not re-created there so everything looks just fine.
By the way, I've been wondering, maybe it would be a good idea to have Plugins folder also at "KeePassProPortable\Data", next to PluginCache and settings?
The issue is back. PluginCache is being re-created at "%USERPROFILE%\AppData\Local\KeePass" despite the fact that the configuration file stored at "PortableApps\KeePassProPortable\Data\settings\KeePass.config.xml" contains:
{APPDIR}\..\..\Data\PluginCache
Any idea what's going on?
It most likely depends on the plugin and not KeePass Pro Portable. Evidently the plugin was developed to leave that folder in that specific position (default location), not giving the user the possibility to change it.
Can you please indicate the source where you got the plugin? Perhaps you can notify the developer of the issue.
You can make these changes to fix the problem:
1) Open the file "KeePassProPortable.ini" present in "App\AppInfo\Launcher" with Notepad++
2) After section "[Activate]" add:
[DirectoriesMove]
LocalPluginCache=%LOCALAPPDATA%\KeePass\PluginCache
3) After section "[FilesMove]" add
[DirectoriesCleanupIfEmpty]
1=%LOCALAPPDATA%\KeePass
I have only one plugin - KeePassHttp and in that PluginCache folder I have two files:
1. KeePassHttp.dll
2. Newtonsoft.Json.dll
I had the same plugin a few months ago when I started this thread. It's weird to see the issue is back again.
Perhaps a plugin is hard coded to use that local path. I'd try removing them both and trying them one at a time to determine which. Maybe there was an update?
To work around this, adding these after [Activate] to the KeePassProPortable.ini within App\AppInfo\Launcher should handle it:
[DirectoriesMove]
LocalPluginCache=%LOCALAPPDATA%\KeePass\PluginCache
[DirectoriesCleanupIfEmpty]
1=%LOCALAPPDATA%\KeePass
LocalPluginCache=%LOCALAPPDATA%\KeePass\LocalPluginCache
The local folder I think it's called "PluginCache". I had set the save as "LocalPluginCache" to prevent it from conflicting with the folder already in Data. Ideally this way both configurations should be saved.
If you prefer to save the configuration in the same folder maybe it would be a setting like:
[DirectoriesMove]
PluginCache=%LOCALAPPDATA%\KeePass\PluginCache
My bad. Yes, we'll keep it separate just for misbehaving plugins.
I did as you suggested and it works! Once the app gets shutdown, KeePass folder disappears from %LOCALAPPDATA% and moves to "\PortableApps\KeePassProPortable\Data\LocalPluginCache". Thank you!
Glad to have helped you
Any idea what is the reason that the plugin gets stored in LOCALAPPDATA instead of KeePassPortable directory by default? The plugin hasn't been updated since 2017 so there is nothing on its side that could explain this. I would rather suspect that there must have been a change in the way KeePass handles plugins.
I think it depends on how the plugin was developed. Instead of basing the configuration on the file "KeePass.config.xml" it use the default path directly.
Update: Agree with John T. Haller, there was probably a change to KeePass Pro that altered the behavior of the plugin.
But it worked fine until one of recent KeePass updates which must have changed something. As I noticed, the plugin hasn't been updated since 2017 so there's no way anything changed in the way it works.
There were no changes to our portablization between when it did work for you and when it didn't. And since the plugin didn't change, a change likely occurred in the app itself. Either way, it's not something we can control other than work around its broken-ness.