[elbe-devel] [PATCH] Follow symbolic links in init_directories

Christian KNAUBER cknauber at adaje-system.fr
Sat May 1 22:00:58 CEST 2021


Make sure we find the correct base path if elbe is launched using a symbolic link.

Fixes Linutronix#301

Signed-off-by: Christian KNAUBER <cknauber at adaje-system.fr>
---
 elbepack/directories.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/directories.py b/elbepack/directories.py
index 3909dbaa4..aea8105a7 100644
--- a/elbepack/directories.py
+++ b/elbepack/directories.py
@@ -23,7 +23,7 @@ def init_directories(elbe_relpath):
     global elbe_dir      #pylint: disable=global-statement
     global examples_dir  #pylint: disable=global-statement
 
-    elbe_exe = os.path.abspath(elbe_relpath)
+    elbe_exe = os.path.abspath(os.path.realpath(elbe_relpath))
     elbe_dir = os.path.dirname(elbe_exe)
 
     if elbe_exe.startswith("/usr/bin/"):
-- 
2.25.1



More information about the elbe-devel mailing list