This commit is contained in:
parent
6a8188f873
commit
f813aa2656
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user