added dirty start check

This commit is contained in:
2022-10-22 23:26:13 -05:00
parent 39c1306aae
commit 1e7ad1ea34
5 changed files with 70 additions and 26 deletions

View File

@@ -6,7 +6,6 @@ import time
# Application imports
from utils.ipc_server import IPCServer
from utils.settings import Settings
from core.window import Window
@@ -23,23 +22,18 @@ class Application(IPCServer):
def __init__(self, args, unknownargs):
super(Application, self).__init__()
if args.debug == "true":
settings.set_debug(True)
if args.trace_debug == "true":
settings.set_trace_debug(True)
if not settings.is_trace_debug():
self.create_ipc_listener()
time.sleep(0.05)
try:
self.create_ipc_listener()
except Exception:
...
if not self.is_ipc_alive:
if unknownargs:
for arg in unknownargs:
if os.path.isdir(arg):
message = f"FILE|{arg}"
self.send_ipc_message(message)
for arg in unknownargs + [args.new_tab,]:
if os.path.isdir(arg):
message = f"FILE|{arg}"
self.send_ipc_message(message)
raise AppLaunchException(f"IPC Server Exists: Will send path(s) to it and close...\nNote: If no fm exists, remove /tmp/{app_name}-ipc.sock")
raise AppLaunchException(f"{app_name} IPC Server Exists: Will send path(s) to it and close...")
Window(args, unknownargs)