From 56f75de6fdc5eb2d3ec9cc82077c5469f163dc10 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Fri, 25 Mar 2011 17:51:25 +0100
Subject: [PATCH] BUG: WM_PROJECT_SITE was not cleaned from PATH

---
 etc/bashrc | 2 +-
 etc/cshrc  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/etc/bashrc b/etc/bashrc
index 1417c75b4dc..f5a29a3d895 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -101,7 +101,7 @@ export FOAM_SIGFPE=
 # The old dirs to be cleaned from the various environment variables
 # - remove anything under top-level directory.
 # NB: the WM_PROJECT_INST_DIR might not be identical between versions
-foamOldDirs="$FOAM_INST_DIR $HOME/$WM_PROJECT/$USER"
+foamOldDirs="$FOAM_INST_DIR $WM_PROJECT_SITE $HOME/$WM_PROJECT/$USER"
 if [ "$WM_PROJECT_INST_DIR" != "$FOAM_INST_DIR" ]
 then
     foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs"
diff --git a/etc/cshrc b/etc/cshrc
index 6fa63e47d1d..b932679ad06 100644
--- a/etc/cshrc
+++ b/etc/cshrc
@@ -107,6 +107,9 @@ if ( $?WM_PROJECT_INST_DIR ) then
         set foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs"
     endif
 endif
+if ( $?WM_PROJECT_SITE ) then
+    set foamOldDirs="$WM_PROJECT_SITE $foamOldDirs"
+endif
 
 
 # Location of installation
-- 
GitLab