summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-03-29 22:22:39 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-03-29 22:22:39 +0000
commit58a6b2ed5541bad9c7369aa357d7fbe43d1e5c66 (patch)
tree480189221a85dcf0e4b7fbd45e435e8be9519896 /src/main.cpp
parentwebslicer: preparing to export (diff)
downloadinkscape-58a6b2ed5541bad9c7369aa357d7fbe43d1e5c66.tar.gz
inkscape-58a6b2ed5541bad9c7369aa357d7fbe43d1e5c66.zip
More correct setting of PYTHONPATH at startup
(bzr r9257)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a6dfb37f0..cd60d9fa1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -545,18 +545,24 @@ static void set_extensions_env()
{
gchar const *pythonpath = g_getenv("PYTHONPATH");
gchar *extdir;
+ gchar *new_pythonpath;
#ifdef WIN32
extdir = g_win32_locale_filename_from_utf8(INKSCAPE_EXTENSIONDIR);
#else
extdir = g_strdup(INKSCAPE_EXTENSIONDIR);
#endif
+ if (pythonpath) {
+ new_pythonpath = g_strdup_printf("%s" G_SEARCHPATH_SEPARATOR_S "%s",
+ extdir, pythonpath);
+ g_free(extdir);
+ } else {
+ new_pythonpath = extdir;
+ }
- gchar *new_pythonpath = g_strdup_printf("%s" G_SEARCHPATH_SEPARATOR_S "%s",
- extdir, pythonpath);
g_setenv("PYTHONPATH", new_pythonpath, TRUE);
- g_free(extdir);
g_free(new_pythonpath);
+ printf("PYTHONPATH = %s", g_getenv("PYTHONPATH"));
}
/**