mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 13:14:15 +02:00
[web] displaying the config dir on the info window | removing the config dir during uninstallation
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import glob
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
@@ -113,3 +115,14 @@ class WebApplication(SoftwarePackage):
|
||||
if custom_icon:
|
||||
self.icon_url = custom_icon
|
||||
|
||||
def get_config_dir(self) -> str:
|
||||
if self.installation_dir:
|
||||
config_path = '{}/.config'.format(Path.home())
|
||||
|
||||
if os.path.exists(config_path):
|
||||
config_dirs = glob.glob('{}/{}-nativefier-*'.format(config_path, self.installation_dir.split('/')[-1]))
|
||||
|
||||
if config_dirs:
|
||||
return config_dirs[0]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user