[web] displaying the config dir on the info window | removing the config dir during uninstallation

This commit is contained in:
Vinícius Moreira
2019-12-18 19:41:22 -03:00
parent ce1f30365d
commit 14008e4ad5
5 changed files with 66 additions and 34 deletions

View File

@@ -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]