From c9f60ad112ad8e254880d78cd1e5d16da5c98c53 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Thu, 17 Oct 2013 21:26:00 +0200 Subject: [PATCH] Fix problem with basedir in cwd with symlink Root cause pointed out by ishikawa@yk.rim.or.jp. --- ccache.c | 2 -- test.sh | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) 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 -- 2.47.2