do not fail in windoz part 3 and last

This commit is contained in:
Nikos Kouremenos 2005-11-22 11:24:10 +00:00
parent 5989b495d1
commit 8beb2e0266
1 changed files with 7 additions and 2 deletions

View File

@ -5,8 +5,13 @@ import sre
from pysqlite2 import dbapi2 as sqlite
if os.name == 'nt':
PATH_TO_LOGS_BASE_DIR = os.environ['appdata'] + '/Gajim/Logs'
PATH_TO_DB = os.path.expanduser('~/.gajim/logs.db') # database is called logs.db
try:
PATH_TO_LOGS_BASE_DIR = os.path.join(os.environ['appdata'], 'Gajim/Logs')
PATH_TO_DB = os.path.join(os.environ['appdata'], 'logs.db') # database is called logs.db
except KeyError:
# win9x
PATH_TO_LOGS_BASE_DIR = 'Logs'
PATH_TO_DB = 'logs.db'
else:
PATH_TO_LOGS_BASE_DIR = os.path.expanduser('~/.gajim/logs')
PATH_TO_DB = os.path.expanduser('~/.gajim/logs.db') # database is called logs.db