User Settings
Next to the database definitions of Settings, every Invantive product keeps settings of the user, such as the language of the user interface, the window layout, the recently opened files and the favourite databases of Favorite Databases. These are held in three files:
| File | Contents | Location |
|---|---|---|
user. |
settings shared by all Invantive products and installations of one user | the configuration master folder, by default %USERPROFILE%\ |
product- |
settings of one product for one user | the folder of the product |
product- |
settings of one installation of one product for one user | the folder of the product installation |
The database a product opened last is held in product-installation-user.settings. Each Invantive product therefore offers the database it was itself used on last, and a database opened in another Invantive product on the same device does not change that. Available from release 27.0.
The files hold no passwords: log on codes and passwords are held in Invantive Keychain.
Format
From release 27.0 onwards each of these files is also written in JSON format, with the extension .json added to the name, such as user.settings.json. The copy in JSON format is the one read; the file in XML format keeps being written, so an older release on the same workstation keeps working.
| Release | Behaviour |
|---|---|
| 26.0 and earlier | the file in XML format is written and read; a file in JSON format is ignored. |
| 26.1 (BETA of 27.0) | both formats are written; the file in JSON format is read. |
| 27.0 | both formats are written; the file in JSON format is read. |
| 28.0 | only the file in JSON format is written and read. |
Release 26.1 is the BETA of release 27.0 and behaves identically to it; see Settings.xml for the release numbering.
Should the file in JSON format be unreadable, the file in XML format is read instead, so a manual edit which goes wrong does not stop a product from starting. That fall-back disappears with release 28.0.
How the Files are Written
The files are written in full on every change. From release 27.0 onwards that happens such that they stay usable when a write does not finish:
- The new contents are written to a file of their own next to the settings file, read back and checked. Only then does that file take the place of the settings file.
- The previous contents remain available with the extension
.bak, such asuser.settings.bak. - A file with
.tmp-in its name is a write which did not finish. It is cleaned up automatically after a day and can be removed safely. - The file on disk is read again just before it is written and the settings of the product doing the writing are merged into it. A second Invantive product running at the same time therefore no longer loses the settings it saved a moment earlier.
Before release 27.0 a settings file which was half written was discarded and replaced by an empty one, whereby the settings of that user were lost.