Fix Engine.app_dir and leftover Backend.pdb()
Use __file__ instead of sys.argv[0] to determine the current script's path, which works correctly when importing the package from another dir
This commit is contained in:
parent
12ce4cdb30
commit
3299aefaf1
@ -4,7 +4,6 @@ import "Banners"
|
||||
import "RoomEventList"
|
||||
|
||||
HColumnLayout {
|
||||
Component.onCompleted: Backend.pdb()
|
||||
property string userId: ""
|
||||
property string roomId: ""
|
||||
|
||||
|
@ -26,7 +26,7 @@ class Engine(QQmlApplicationEngine):
|
||||
self._sigint_timer.start(100)
|
||||
|
||||
super().__init__()
|
||||
self.app_dir = Path(sys.argv[0]).resolve().parent
|
||||
self.app_dir = Path(__file__).resolve().parent
|
||||
|
||||
from .backend.backend import Backend
|
||||
self.backend = Backend(self)
|
||||
|
Loading…
Reference in New Issue
Block a user