From 4a9b2f1d16c8494c007d5db473625fd4bd206ae0 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 8 Nov 2008 18:22:12 +0900 Subject: [PATCH] Don't canonicalise pathnames of included files. Fixes bug #24553 --- src/language/utilities/include.c | 4 +--- tests/command/insert.sh | 13 +++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/language/utilities/include.c b/src/language/utilities/include.c index d7b10283..8e69dab5 100644 --- a/src/language/utilities/include.c +++ b/src/language/utilities/include.c @@ -26,7 +26,6 @@ #include #include "dirname.h" -#include "canonicalize.h" #include "xalloc.h" #include "gettext.h" @@ -191,8 +190,7 @@ parse_insert (struct lexer *lexer, char **filename) return CMD_FAILURE; } - *filename = canonicalize_file_name (relative_filename); - free (relative_filename); + *filename = relative_filename; return CMD_SUCCESS; } diff --git a/tests/command/insert.sh b/tests/command/insert.sh index 354a54f8..be7f9e08 100755 --- a/tests/command/insert.sh +++ b/tests/command/insert.sh @@ -2,7 +2,8 @@ # This program tests the INSERT command -TEMPDIR=/tmp/pspp-tst-$$ +BASETEMPDIR=/tmp/pspp-tst-$$ +TEMPDIR=$BASETEMPDIR/link TESTFILE=$TEMPDIR/`basename $0`.sps # ensure that top_srcdir and top_builddir are absolute @@ -23,11 +24,11 @@ export LANG cleanup() { if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then - echo "NOT cleaning $TEMPDIR" + echo "NOT cleaning $BASETEMPDIR" return ; fi cd / - rm -rf $TEMPDIR + rm -rf $BASETEMPDIR } @@ -54,7 +55,9 @@ pass() exit 0; } -mkdir -p $TEMPDIR +mkdir -p $BASETEMPDIR/target + +ln -s $BASETEMPDIR/target $TEMPDIR cd $TEMPDIR @@ -249,6 +252,4 @@ $TEMPDIR/foo.sps:10: error: DISPLAY: AKSDJ is not a variable name. EOF if [ $? -ne 0 ] ; then fail ; fi - - pass; -- 2.30.2