diff options
Diffstat (limited to 'src/configuration/Appconfig.py')
-rw-r--r-- | src/configuration/Appconfig.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py index d0b4fd18..ab19ada5 100644 --- a/src/configuration/Appconfig.py +++ b/src/configuration/Appconfig.py @@ -34,9 +34,14 @@ class Appconfig(QtWidgets.QWidget): """ # Home directory + if os.name == 'nt': + user_home = os.path.join('library', 'config') + else: + user_home = os.path.expanduser('~') + try: file = open(os.path.join( - os.path.expanduser("~"), ".esim/workspace.txt"), 'r' + user_home, ".esim/workspace.txt"), 'r' ) workspace_check, home = file.readline().split(' ', 1) file.close() @@ -65,11 +70,8 @@ class Appconfig(QtWidgets.QWidget): parser_esim = ConfigParser() parser_esim.read( - os.path.join( - os.path.expanduser("~"), - os.path.join( - '.esim', - 'config.ini'))) + os.path.join(user_home, '.esim', 'config.ini') + ) # Try catch added, since eSim cannot be accessed under parser for Win10 try: @@ -103,9 +105,9 @@ class Appconfig(QtWidgets.QWidget): # Application Details self._APPLICATION = 'eSim' - self._VERSION = '2.1' + self._VERSION = '2.2' self._AUTHOR = 'Fahim' - self._REVISION = 'Rahul' + self._REVISION = 'Rahul, Sumanto' # Application geometry setting self._app_xpos = 100 |