[gimp] Bug 722939 - asking for an absolute path as gimpdir results in a path...



commit 6e07c839784ad3cedbeb0dd9fe646ab3f8554825
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jan 25 19:01:46 2014 +0100

    Bug 722939 - asking for an absolute path as gimpdir results in a path...
    
    ...relative to the home folder
    
    If an absolute path was given to the --with-gimpdir configure option,
    use that path literally.

 configure.ac          |    2 +-
 libgimpbase/gimpenv.c |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f7645e1..3ac8bfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1946,7 +1946,7 @@ AM_CONDITIONAL(ENABLE_GIMP_CONSOLE, test "x$enable_gimp_console" != xno)
 
 # Possibly change default gimpdir from .gimp-major.minor
 gimpdir=GIMP
-AC_ARG_WITH(gimpdir, [  --with-gimpdir=DIR      change default gimpdir from 
$XDG_CONFIG_HOME/GIMP/gimp_user_version to $XDG_CONFIG_HOME/DIR/gimp_user_version],
+AC_ARG_WITH(gimpdir, [  --with-gimpdir=DIR      change default gimpdir from 
$XDG_CONFIG_HOME/GIMP/gimp_user_version to $XDG_CONFIG_HOME/DIR/gimp_user_version, or to DIR if DIR is an 
absolute path],
 if eval "test x$with_gimpdir != x"; then
   if eval "test x$with_gimpdir != xyes"; then
     gimpdir=$with_gimpdir
diff --git a/libgimpbase/gimpenv.c b/libgimpbase/gimpenv.c
index 5d9ac99..b8a9580 100644
--- a/libgimpbase/gimpenv.c
+++ b/libgimpbase/gimpenv.c
@@ -251,6 +251,10 @@ gimp_directory (void)
             gimp_dir = g_build_filename (gimp_data_directory (), env_gimp_dir, NULL);
         }
     }
+  else if (g_path_is_absolute (GIMPDIR))
+    {
+      gimp_dir = g_strdup (GIMPDIR);
+    }
   else
     {
 #ifdef PLATFORM_OSX


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]