From: joncruz Date: Thu, 4 Jun 2009 08:27:33 +0000 (+0000) Subject: Cleaned and applied portable app patch. Fixes bug #382394. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f67aa43a1c8fa661f5e40b41f4031a4b19cfca4a;p=inkscape.git Cleaned and applied portable app patch. Fixes bug #382394. --- 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\;