[ooo-build-commit] .: Branch 'ooo-build-3-2' - patches/dev300

René Engelhard rene at kemper.freedesktop.org
Wed Apr 7 13:28:22 PDT 2010


 patches/dev300/nsplugin-path.diff |   20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 79f0907ed32cdd12cf129e82a8ea942b2f555dc9
Author: Rene Engelhard <rene at debian.org>
Date:   Wed Apr 7 22:27:24 2010 +0200

    make nsplugin-path.diff handle relative symlinks
    
    * patches/dev300/nsplugin-path.diff: add patch from mmeeks

diff --git a/patches/dev300/nsplugin-path.diff b/patches/dev300/nsplugin-path.diff
index da1d95b..3818604 100644
--- a/patches/dev300/nsplugin-path.diff
+++ b/patches/dev300/nsplugin-path.diff
@@ -8,7 +8,7 @@
  #include <stdarg.h>
  // For vsnprintf()
  #define NSP_vsnprintf vsnprintf
-@@ -122,6 +123,96 @@ restoreUTF8(char *pPath)
+@@ -122,6 +123,114 @@ restoreUTF8(char *pPath)
      return 0;
  }
  
@@ -94,6 +94,24 @@
 +		*clobber = '\0';
 +		strcpy (realFileName, libFileName);
 +	}
++
++	fprintf (stderr, "OpenOffice path before fixup is '%s'\n", realFileName);
++
++	if (realFileName[0] != '/') {
++		/* a relative sym-link and we need to get an absolute path */
++		char scratch[NPP_PATH_MAX] = {0};
++		if (strlen (realFileName) + strlen (libFileName) + 2 >= NPP_PATH_MAX - 1)
++		{
++			fprintf (stderr, "Paths too long to fix up.\n");
++			return 1;
++		}
++		strcpy (scratch, libFileName);
++		if (strrchr (scratch, '/')) /* remove the last element */
++			*(strrchr (scratch, '/') + 1) = '\0';
++		strcat (scratch, realFileName);
++		strcpy (realFileName, scratch);
++	}
++
 +	*aResult = realFileName;
 +
 +	fprintf (stderr, "OpenOffice path is '%s'\n", realFileName);


More information about the ooo-build-commit mailing list