Files
bearhub/fpakman/core/resource.py
Vinicius Moreira 1daf3eb5e2 Locale path fix
2019-06-17 16:03:28 -03:00

14 lines
387 B
Python
Executable File

import os
from pathlib import Path
local_resource_path = '{}/.local/share/fpakman/resources'.format(str(Path.home()))
app_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def get_path(resource_path):
if os.path.exists(local_resource_path):
return local_resource_path + '/' + resource_path
else:
return app_dir + '/resources/' + resource_path