Chdir to application directory.

This commit is contained in:
Juan Pablo Caram 2015-01-19 17:24:41 -05:00
parent 6361ad3338
commit 05d6adda8b
1 changed files with 2 additions and 0 deletions

View File

@ -133,9 +133,11 @@ class App(QtCore.QObject):
json.dump([], f)
f.close()
# Application directory. Chdir to it.
self.app_home = os.path.dirname(os.path.realpath(__file__))
App.log.debug("Application path is " + self.app_home)
App.log.debug("Started in " + os.getcwd())
os.chdir(self.app_home)
QtCore.QObject.__init__(self)