fix path on info plugin
All checks were successful
Test / Test (push) Successful in 1m17s

This commit is contained in:
John Burwell 2023-05-12 16:41:56 -05:00
parent 6a8188f873
commit f813aa2656

View File

@ -17,6 +17,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
import logging import logging
import os
import pkg_resources import pkg_resources
import platformdirs import platformdirs
@ -43,10 +44,12 @@ class Plugin():
@property @property
def file(self) -> Path: def file(self) -> Path:
file_dir = platformdirs.user_config_dir(
appname=self.api.config.app_name)
if not os.path.exists(file_dir):
os.makedirs(file_dir)
self._file = Path().joinpath( self._file = Path().joinpath(
platformdirs.user_config_dir( file_dir,
appname=self.api.config.app_name,
ensure_exists=True),
'info.txt' 'info.txt'
) )
return self._file return self._file