#63 AzSMRC tries to write to Program Files

Rolf Wojtech

I'm using AzSMRC in Windows 7 x64 but I assume this problem affects Vista as well.
Vuze is installed to C:\Program Files (x64)\Vuze.
When I install AzSMRC it fails to write its config because (looked at the source code) it tries to write to C:\Program Files (x64)\Vuze\Plugins.
Writing to that directory is very bad practice and is discouraged by Microsoft.

The faulty line is in Plugin.java
148 config = XMLConfig.loadConfigFile(pluginInterface
149 .getPluginDirectoryName()
150 + System.getProperty("file.separator") + "MultiUserConfig.xml");

Apparently .getPluginDirectoryName() is only intended to find out where the plugin.jar lies, NOT to find out where to write files.
See http://forum.vuze.com/thread.jspa?messageID=177829 for details on how to resolve this (pluginInterface.getPluginconfig().getPluginUserFile(String) is the correct way).
You'll probably need to add compatibility/migration code that tries reading(!) the config from the old directory first and then copies it to the correct directory.

For now, I work around the issue by installing Vuze to a directory that isn't protected by Windows. However this clearly is a bug and should be fixed.
Please let me know if you don't have to time to fix this.

See this discussion for t