At work, we use "folder redirection" and hence %appdata% points to a
directory on a file server. This causes problems with Jitsi, as it
a) constantly writes the .log and .pcap over the network
b) leaves files open and hence prevents standby
The cache files created by Felix in the sip-communicator.bin directory are
equally bad. Even worse, if two computers had different versions of Jitsi
installed, the shared cache can confuse Felix to death.
Are there any objections that I move these to %localappdata%\Jitsi\ (which
usually expands to c:\users\username\AppData\local\Jitsi)?
I finally found the time to work on this, the result is attached. Basically,
I modified the FileAccessService to demand a second parameter on
getPrivatePersistentFile/Directory: a FileCategory to classify the file.
There are 3 options
- PROFILE: configuration data, message history, contacts, etc.
- CACHE: avatars, downloaded spelling dictionaries, the FMJ registry, etc.
- LOG: application logs (.pcaps, .logs)
All calls to getPrivatePersistentFile/Directory are modified to include this
- On Windows, application logs and cached data now go %localappdata%\Jitsi
if the environment variable exists, otherwise the folder follows PROFILE,
which is what we currently use.
- On OSX, the application logs go to the folder suggested by Apple
- There is no change for Unix
Data present at the current directory will remain there, but will no longer
be used. (The reason to not delete it is that I didn't want to clutter the
launcher class stuff created from all the various components. If this is
desired to avoid confusion (especially with regard to old logs), I'll add
this if you don't mind the clutter.)
Any objections before I commit this?
0001-Add-a-classification-for-persistent-files.patch (21.5 KB)
0001-Use-temporary-file-for-XMPP-server-list.patch (4.73 KB)
0002-Use-separate-dirs-for-application-logs-cache-and-con.patch (33.5 KB)