From f67aa43a1c8fa661f5e40b41f4031a4b19cfca4a Mon Sep 17 00:00:00 2001 From: joncruz Date: Thu, 4 Jun 2009 08:27:33 +0000 Subject: [PATCH] Cleaned and applied portable app patch. Fixes bug #382394. --- src/inkscape.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/inkscape.cpp b/src/inkscape.cpp index f1e2c1684..60ab895ed 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -1381,7 +1381,15 @@ gchar * profile_path(const char *filename) { static const gchar *prefdir = NULL; + + if (!prefdir) { + // First check for a custom environment variable for a "portable app" + gchar const *val = g_getenv("INKSCAPE_PORTABLE_PROFILE_DIR"); + if (val) { + prefdir = g_strdup(val); + } + #ifdef HAS_SHGetSpecialFolderLocation // prefer c:\Documents and Settings\UserName\Application Data\ to // c:\Documents and Settings\userName\; -- 2.30.2