fix a filedialog for hidden Files work

install rollback to bash for start wirepy and wirepy rollback to bash
This commit is contained in:
2024-09-19 18:54:14 +02:00
parent ad59c3ba00
commit 4e841301f7
5 changed files with 31 additions and 14 deletions

View File

@ -181,9 +181,8 @@ class ImportTunnel:
def wg_import_select(self):
try:
filepath = filedialog.askopenfilename(initialdir=Path('/home/'), title='Select Wireguard config '
'File',
filetypes=[('WG config files', '*.conf')], )
filepath = filedialog.askopenfilename(initialdir='/home/', title='Select Wireguard config File',
filetypes=[('WG config files', '*.conf')],)
with open(filepath, 'r') as file:
read = file.read()
@ -294,12 +293,13 @@ class OnOff:
class ExportTunnels:
@staticmethod
def wg_export():
_u = Path.read_text(Path('/tmp/_u'))
now_time = datetime.now()
now_datetime = now_time.strftime('wg-exp-' + '%m-%d-%Y' + '-' + '%H:%M')
tl = ListTunnels.tl_list()
try:
if len(tl) != 0:
wg_tar = Path(f'/{home}/'), now_datetime
wg_tar = _u, now_datetime
p_to_conf = Path('/etc/wire_py/')
shutil.make_archive(wg_tar, 'zip', p_to_conf)
#if zip_full != 0: