# HG changeset patch
# User Edouard Tisserant <edouard@beremiz.fr>
# Date 1740757286 -3600
# Node ID ef48f96ccf06d077295b3d48466641a4291a0fd5
# Parent  6b4e1452fa166104688aede34e28551a0ed9667a
python runtime: fix behaviour of -c when given file do not exist yet

diff -r 6b4e1452fa16 -r ef48f96ccf06 Beremiz_service.py
--- a/Beremiz_service.py	Thu Feb 27 14:55:42 2025 +0100
+++ b/Beremiz_service.py	Fri Feb 28 16:41:26 2025 +0100
@@ -158,9 +158,9 @@
             _PSKpath = os.path.join(a, "wampconf.json")
             if os.path.isfile(_PSKpath):
                 wampconf = _PSKpath
-        elif os.path.isfile(a):
+        elif os.path.isfile(a) or os.path.isdir(paths.AbsDir(a)):
             wampconf = a
-            ConfDir = os.path.dirname(a)
+            ConfDir = paths.AbsDir(a)
     elif o == "-s":
         if a == "off":
             PSKpath = None