From: Joel Rosdahl Date: Thu, 17 Oct 2013 19:26:00 +0000 (+0200) Subject: Fix problem with basedir in cwd with symlink X-Git-Tag: v3.2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9f60ad112ad8e254880d78cd1e5d16da5c98c53;p=thirdparty%2Fccache.git Fix problem with basedir in cwd with symlink Root cause pointed out by ishikawa@yk.rim.or.jp. --- diff --git a/ccache.c b/ccache.c index ea9b39ba3..90c38e748 100644 --- a/ccache.c +++ b/ccache.c @@ -2464,8 +2464,6 @@ initialize(void) if (conf->umask != UINT_MAX) { umask(conf->umask); } - - current_working_dir = get_cwd(); } /* Reset the global state. Used by the test suite. */ diff --git a/test.sh b/test.sh index 5e042b4db..b8d116580 100755 --- a/test.sh +++ b/test.sh @@ -1429,7 +1429,8 @@ EOF $CCACHE -z >/dev/null $CCACHE -C >/dev/null - cd dir1 + ln -s dir1 symlink_to_dir1 + cd symlink_to_dir1 CCACHE_BASEDIR="`pwd`" $CCACHE $COMPILER -I`pwd`/include -c src/test.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0