-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: NoFixVersionApplicable
-
Fix Version/s: 5.2.0
-
Component/s: Configuration
-
Tags:
-
Sprint:nxDrive 11.2.19
-
Story Points:1
Problem
Content of $HOME/.nuxeo-drive/config.ini (1):
[DEFAULT] env = oauth [oauth] nxdrive_home = /users/tiger-222/desktop/alternate-home
Content of /users/tiger-222/desktop/alternate-home/config.ini (2):
[DEFAULT] env = features [features] feature_synchronization = True
When Drive starts, it will check the (1) config file and see that another nxdrive_home folder should be used. The change is applied directly.
Then the user will be surprised because the synchronization will not be enabled. One will try to re-enable the feature and restart Drive. Same results.
Analysis
When saving features states, save_config() will use the path returned by get_config_path() and it is Options.nxdrive_home / "config.ini". So the config file is written to (2), and this is the exected behavior.
Fix
When nxdrive_home is changed, we should also fecth the eventual config.ini from the new folder to update options.
To prevent circular issues (when the new config file also set nxdrive_home, which would be crazy though) we will only fetch config file when nxdrive_home changes 1 time.
- Is referenced in