intoducing LOG_DB_PATH
This commit is contained in:
parent
374bde0914
commit
d4ad6d8cb9
|
@ -38,20 +38,25 @@ log = logging.getLogger('Gajim')
|
||||||
log.addHandler(h)
|
log.addHandler(h)
|
||||||
|
|
||||||
logger = common.logger.Logger()
|
logger = common.logger.Logger()
|
||||||
DATA_DIR = '../data'
|
|
||||||
LOGPATH = os.path.expanduser('~/.gajim/logs')
|
|
||||||
VCARDPATH = os.path.expanduser('~/.gajim/vcards')
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
if '.svn' not in os.listdir('.'): # we are normal users (not svn users)
|
if '.svn' not in os.listdir('.'): # we are normal users (not svn users)
|
||||||
DATA_DIR = 'data'
|
DATA_DIR = 'data'
|
||||||
try:
|
try:
|
||||||
# Documents and Settings\[User Name]\Application Data\Gajim\logs
|
# Documents and Settings\[User Name]\Application Data\Gajim\logs
|
||||||
LOGPATH = os.path.join(os.environ['appdata'], 'Gajim', 'Logs')
|
LOGPATH = os.path.join(os.environ['appdata'], 'Gajim', 'Logs') # deprecated
|
||||||
|
LOG_DB_PATH = os.path.join(os.environ['appdata'], 'Gajim', 'logs.db')
|
||||||
VCARDPATH = os.path.join(os.environ['appdata'], 'Gajim', 'Vcards')
|
VCARDPATH = os.path.join(os.environ['appdata'], 'Gajim', 'Vcards')
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# win9x, ./logs
|
# win9x, ./Logs etc
|
||||||
LOGPATH = 'Logs'
|
LOGPATH = 'Logs' # deprecated
|
||||||
VCARDPATH = 'Vcards'
|
VCARDPATH = 'Vcards'
|
||||||
|
LOG_DB_PATH = 'logs.db'
|
||||||
|
else: # Unices
|
||||||
|
DATA_DIR = '../data'
|
||||||
|
LOGPATH = os.path.expanduser('~/.gajim/logs') # deprecated
|
||||||
|
LOG_DB_PATH = os.path.expanduser('~/.gajim/logs.db')
|
||||||
|
VCARDPATH = os.path.expanduser('~/.gajim/vcards')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
LOGPATH = LOGPATH.decode(sys.getfilesystemencoding())
|
LOGPATH = LOGPATH.decode(sys.getfilesystemencoding())
|
||||||
VCARDPATH = VCARDPATH.decode(sys.getfilesystemencoding())
|
VCARDPATH = VCARDPATH.decode(sys.getfilesystemencoding())
|
||||||
|
|
Loading…
Reference in New Issue