From 2670bb3bdfa4ea017d0245656a824dbaf33fb95b Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Thu, 4 Jun 2009 08:27:33 +0000 Subject: Cleaned and applied portable app patch. Fixes bug #382394. (bzr r7992) --- src/inkscape.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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\; -- cgit v1.2.3