From 1cd5befbf3c0142cb80ce3752fb03c3058c11aa3 Mon Sep 17 00:00:00 2001 From: aik2 Date: Mon, 25 Jul 2022 14:31:12 +0400 Subject: [PATCH] fix relative path in menu.py --- mounter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mounter.py b/mounter.py index 6fb3fe6..d7573df 100644 --- a/mounter.py +++ b/mounter.py @@ -15,12 +15,13 @@ class mount(Command): Show menu to mount and unmount """ - def execute(self): """ Show menu to mount and unmount """ (f, p) = tempfile.mkstemp() os.close(f) - self.fm.execute_console(f"shell python3 {os.getcwd()}/menu.py {p}") + self.fm.execute_console( + f"shell python3 {os.path.dirname(os.path.realpath(__file__))}/menu.py {p}" + ) with open(p, 'r') as f: d = f.readline() if os.path.exists(d):