Philipp Hörist pushed to branch master at gajim / gajim
Commits:
3efa731f by Philipp Hörist at 2018-04-23T00:10:35+02:00
Add stanza_id index also when we create the DB
- - - - -
1 changed file:
- gajim/common/logger.py
Changes:
=====================================
gajim/common/logger.py
=====================================
--- a/gajim/common/logger.py
+++ b/gajim/common/logger.py
@@ -187,6 +187,9 @@ class Logger:
);
CREATE INDEX idx_logs_jid_id_time ON logs (jid_id, time DESC);
+
+ CREATE INDEX idx_logs_stanza_id ON logs (stanza_id);
+
'''
)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/3efa731fbf89e199aee110019745923e7f…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/3efa731fbf89e199aee110019745923e7f…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
3ad539cb by Philipp Hörist at 2018-04-22T02:30:08+02:00
Make sure all config dirs get created
LOG_DB_FOLDER and CACHE_DB_FOLDER are equal to MY_DATA and MY_CACHE
- - - - -
2 changed files:
- gajim/common/check_paths.py
- gajim/common/configpaths.py
Changes:
=====================================
gajim/common/check_paths.py
=====================================
--- a/gajim/common/check_paths.py
+++ b/gajim/common/check_paths.py
@@ -178,11 +178,8 @@ def split_db():
logger.CACHE_DB_PATH = tmp
def check_and_possibly_create_paths():
- LOG_DB_PATH = logger.LOG_DB_PATH
- LOG_DB_FOLDER, LOG_DB_FILE = os.path.split(LOG_DB_PATH)
-
- CACHE_DB_PATH = logger.CACHE_DB_PATH
- CACHE_DB_FOLDER, CACHE_DB_FILE = os.path.split(CACHE_DB_PATH)
+ LOG_DB_PATH = configpaths.get('LOG_DB')
+ CACHE_DB_PATH = configpaths.get('CACHE_DB')
for path in configpaths.get_paths(PathType.FOLDER):
if not os.path.exists(path):
@@ -192,20 +189,6 @@ def check_and_possibly_create_paths():
print(_('Gajim will now exit'))
sys.exit()
- if not os.path.exists(LOG_DB_FOLDER):
- create_path(LOG_DB_FOLDER)
- elif os.path.isfile(LOG_DB_FOLDER):
- print(_('%s is a file but it should be a directory') % LOG_DB_FOLDER)
- print(_('Gajim will now exit'))
- sys.exit()
-
- if not os.path.exists(CACHE_DB_FOLDER):
- create_path(CACHE_DB_FOLDER)
- elif os.path.isfile(CACHE_DB_FOLDER):
- print(_('%s is a file but it should be a directory') % CACHE_DB_FOLDER)
- print(_('Gajim will now exit'))
- sys.exit()
-
if not os.path.exists(LOG_DB_PATH):
if os.path.exists(CACHE_DB_PATH):
os.remove(CACHE_DB_PATH)
=====================================
gajim/common/configpaths.py
=====================================
--- a/gajim/common/configpaths.py
+++ b/gajim/common/configpaths.py
@@ -124,7 +124,7 @@ class ConfigPaths:
return path
def _add(self, name, path, location=None, path_type=None, unique=False):
- if location is not None:
+ if path and location is not None:
path = self._prepare(path, unique)
self._paths[name] = (location, path, path_type)
@@ -135,9 +135,9 @@ class ConfigPaths:
user_dir_paths = [
('TMP', tempfile.gettempdir()),
- ('MY_CONFIG', self.config_root),
- ('MY_CACHE', self.cache_root),
- ('MY_DATA', self.data_root),
+ ('MY_CONFIG', '', PathLocation.CONFIG, PathType.FOLDER),
+ ('MY_CACHE', '', PathLocation.CACHE, PathType.FOLDER),
+ ('MY_DATA', '', PathLocation.DATA, PathType.FOLDER),
]
for path in user_dir_paths:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/3ad539cbf266d1515df2e5e066d206e521…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/3ad539cbf266d1515df2e5e066d206e521…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c0c16dbf by Philipp Hörist at 2018-04-21T21:28:19+02:00
Dont change path names because plugins use them
- - - - -
2 changed files:
- gajim/common/configpaths.py
- gajim/common/helpers.py
Changes:
=====================================
gajim/common/configpaths.py
=====================================
--- a/gajim/common/configpaths.py
+++ b/gajim/common/configpaths.py
@@ -134,9 +134,9 @@ class ConfigPaths:
user_dir_paths = [
('TMP', tempfile.gettempdir()),
- ('CONFIG_ROOT', self.config_root),
- ('CACHE_ROOT', self.cache_root),
- ('DATA_ROOT', self.data_root),
+ ('MY_CONFIG', self.config_root),
+ ('MY_CACHE', self.cache_root),
+ ('MY_DATA', self.data_root),
]
for path in user_dir_paths:
=====================================
gajim/common/helpers.py
=====================================
--- a/gajim/common/helpers.py
+++ b/gajim/common/helpers.py
@@ -863,7 +863,7 @@ def check_soundfile_path(file_, dirs=None):
:return the path to file or None if it doesn't exists.
"""
if dirs is None:
- dirs = [app.configpaths.get('DATA_ROOT'),
+ dirs = [app.configpaths.get('MY_DATA'),
app.DATA_DIR]
if not file_:
@@ -891,7 +891,7 @@ def strip_soundfile_path(file_, dirs=None, abs=True):
return None
if dirs is None:
- dirs = [app.configpaths.get('DATA_ROOT'),
+ dirs = [app.configpaths.get('MY_DATA'),
app.DATA_DIR]
name = os.path.basename(file_)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/c0c16dbf94ee30d76cf076c2f9c26f34eb…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/c0c16dbf94ee30d76cf076c2f9c26f34eb…
You're receiving this email because of your account on dev.gajim.org.