MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.51k stars 1.27k forks source link

Do not create configs folders until writing #3045

Closed forslund closed 2 years ago

forslund commented 2 years ago

Description

This replaces save_path with usage of the xdg_home when handling config files as suggested by @JarbasAI in #3044. This means the config system will not create folders unless actually written.

The check for whether a directory needs to be created is handled behind a lock to avoid race conditions.

It also changes some usages in strings where the

The save_config_path() call still exists in the FileSystemAccess-class as a file is opened, which should probably be improved as well.

Contributor license agreement signed?

CLA [ x ]

codecov-commenter commented 2 years ago

Codecov Report

Merging #3045 (6b5d45e) into dev (89cfad7) will increase coverage by 0.03%. The diff coverage is 84.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #3045      +/-   ##
==========================================
+ Coverage   53.05%   53.09%   +0.03%     
==========================================
  Files         123      123              
  Lines       11183    11188       +5     
==========================================
+ Hits         5933     5940       +7     
+ Misses       5250     5248       -2     
Impacted Files Coverage Δ
mycroft/client/enclosure/mark1/__init__.py 0.00% <0.00%> (ø)
mycroft/client/speech/hotword_factory.py 70.70% <ø> (ø)
mycroft/client/text/text_client.py 0.00% <ø> (ø)
mycroft/configuration/config.py 73.88% <100.00%> (+1.58%) :arrow_up:
mycroft/configuration/locations.py 100.00% <100.00%> (+6.66%) :arrow_up:
mycroft/util/combo_lock.py 90.62% <0.00%> (+9.37%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 89cfad7...6b5d45e. Read the comment docs.

devops-mycroft commented 2 years ago

Voight Kampff Integration Test Succeeded (Results)