Comment 2 for bug 538478

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Besides wanting to allow multiple config dirs, another reason for overriding default paths is that some of the paths in the core for *nix are non-standard nowadays (e.g. $HOME/.dc++) as seen in bug #329805 and bug #316358. But to change them would require calling a linux library that differs between distros, which is not feasible from within the core.

In addition to the overrides map Razzloss suggests, two alternative approaches that I can also suggest:

1) Add setPath(Paths type, string path) to Util so the UI can manually override the defaults of the core when needed.
2) Store all paths inside SettingsManager instead of inside Util. This would allow the UI to override them and even allow the user to override some of them, if that is desired. It also would remove the awkwardness of storing some paths both in Util and in SettingsManager like the download directories.

With either of these approaches, some mechanism would be needed to "refresh" the core to make use of the updated paths (i.e. reload config xmls, etc).