BUG: foamCleanPath: did not remove last element in path when stripping using wildcards

This commit is contained in:
mattijs
2011-02-21 16:43:11 +00:00
parent d6874f0fce
commit 0ffe4c0fd9

View File

@ -3,7 +3,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. # \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# License # License
@ -94,7 +94,7 @@ do
wildcard=$1 wildcard=$1
shift shift
##DEBUG echo "remove>$wildcard<" 1>&2 ##DEBUG echo "remove>$wildcard<" 1>&2
dirList=$(echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g") dirList=$(echo "$dirList:" | sed -e "s@${wildcard}[^:]*:@@g")
done done
# split on ':' (and on space as well to avoid any surprises) # split on ':' (and on space as well to avoid any surprises)