summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-05-25 22:01:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-05-25 22:02:15 (GMT)
commiteef3392134b489fbff7c96046581c987ff7192bd (patch)
treed9926feb13b8a5008cc0013e7ad0a5adb9c73637 /plugins
parent2d16cca046ff80f2be3eea6934dd1dd8f4b807d1 (diff)
Provided a way to relocate built binaries.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pychrysalide/pychrysa.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/pychrysalide/pychrysa.c b/plugins/pychrysalide/pychrysa.c
index 96d61ae..29b0ee8 100644
--- a/plugins/pychrysalide/pychrysa.c
+++ b/plugins/pychrysalide/pychrysa.c
@@ -42,6 +42,7 @@
#include <common/environment.h>
#include <common/extstr.h>
#include <core/core.h>
+#include <core/paths.h>
#include <plugins/pglist.h>
#include <plugins/self.h>
@@ -654,6 +655,9 @@ static void extend_python_path(const char *path)
static void load_python_plugins(GPluginModule *plugin)
{
+#ifdef DISCARD_LOCAL
+ char *edir; /* Répertoire de base effectif */
+#endif
DIR *dir; /* Répertoire à parcourir */
char *paths; /* Emplacements de greffons */
char *save; /* Sauvegarde pour ré-entrance */
@@ -671,12 +675,18 @@ static void load_python_plugins(GPluginModule *plugin)
#else
- dir = opendir(PLUGINS_DATA_DIR G_DIR_SEPARATOR_S "python");
+ edir = get_effective_directory(PLUGINS_DATA_DIR G_DIR_SEPARATOR_S "python");
+ dir = opendir(edir);
+ free(edir);
if (dir != NULL)
{
closedir(dir);
- extend_python_path(PLUGINS_DATA_DIR G_DIR_SEPARATOR_S "python");
+
+ edir = get_effective_directory(PLUGINS_DATA_DIR G_DIR_SEPARATOR_S "python");
+ extend_python_path(edir);
+ free(edir);
+
}
#endif
@@ -942,7 +952,7 @@ void log_pychrysalide_exception(const char *prefix, ...)
PyErr_Fetch(&err_type, &err_value, &err_traceback);
if (err_value == NULL)
- msg = stradd(msg, _("; no extra information is provided..."));
+ msg = stradd(msg, _(": no extra information is provided..."));
else
{