From b9b00ee4d3d42acc457fda241b2150f2525e6a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Fri, 12 Aug 2022 16:54:09 +0200 Subject: [PATCH] Fix log folder on linux If the software is installed by the linux distributions, it is in /usr/ and a normal user does not have any right access on this folder. --- connecthys/application/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/connecthys/application/__init__.py b/connecthys/application/__init__.py index 6bbf4ca..4fb90b4 100644 --- a/connecthys/application/__init__.py +++ b/connecthys/application/__init__.py @@ -17,7 +17,10 @@ import os.path REP_APPLICATION = os.path.abspath(os.path.dirname(__file__)) -REP_CONNECTHYS = os.path.dirname(REP_APPLICATION) +if sys.platform.startswith('linux'): + REP_CONNECTHYS = os.path.join("/", "var", "log", "connectys") +else: + REP_CONNECTHYS = os.path.dirname(REP_APPLICATION) REP_PIECES = REP_CONNECTHYS + "/pieces" # Récupération du numéro de version de l'application