You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The per-user configuration directory should not be created by JsonConfigFileAccessor until a write operation to user config file is requested #2037
JsonConfigFileAccessor tries to create the per-user configuration directory at initialization, even if on configuration file is put there. And currently both read and write operations targeting the user scope settings will trigger the creation of the directory.
There is an edge case that we have to deal with -- what if somehow it fails to create the directory? The current implementation is to let the exception pop up, and reply on the caller to handle this situation. However, if the caller only issues a read request, it shouldn't matter that the configuration directory cannot be created, because that means no configuration file is there, so a default value should be returned for the setting, such as null for a string value.
IMHO, The per-user configuration directory should only be created when powershell has to -- only write requests to the user settings would trigger the creation of the directory.
Activity
andyleejordan commentedon Sep 19, 2016
Heh, yes this is an edge case we ran into pretty quickly, in both #2205 and #2299.