Skip to content
Snippets Groups Projects
Commit dad301d8 authored by mark's avatar mark Committed by Mark OLESEN
Browse files

BUG: foamCleanPath problem if path contains @ (closes #264)

- Can occur with some user names, or mounted paths.
  Resolve by using '?' for the separation character.

  Since '?' is a shell-glob, it is highly unlikely to occur appear in
  filenames.  Additionally, it is not a meta-character in standard sed,
  nor in the GNU extension (which uses '\?').
parent 779f8843
Branches
Tags
No related merge requests found
...@@ -99,7 +99,7 @@ IFS=': ' ...@@ -99,7 +99,7 @@ IFS=': '
# or may contain ':' separators # or may contain ':' separators
set -- $* set -- $*
# strip out wildcards via sed # Strip out wildcards via sed. Path and wildcard cannot contain '?'.
while [ "$#" -ge 1 ] while [ "$#" -ge 1 ]
do do
wildcard=$1 wildcard=$1
...@@ -107,7 +107,7 @@ do ...@@ -107,7 +107,7 @@ do
##DEBUG echo "remove>$wildcard<" 1>&2 ##DEBUG echo "remove>$wildcard<" 1>&2
if [ -n "$wildcard" ] if [ -n "$wildcard" ]
then then
dirList=$(echo "$dirList:" | sed -e "s@${wildcard}[^:]*:@@g") dirList=$(echo "$dirList:" | sed -e "s?${wildcard}[^:]*:??g")
fi fi
done done
......
...@@ -39,15 +39,15 @@ ...@@ -39,15 +39,15 @@
if [ "$#" -gt 0 ] if [ "$#" -gt 0 ]
then then
realFilePath=$(echo $1 | sed -e s@^$WM_PROJECT_DIR@../../..@ ) realFilePath=$(echo "$1" | sed -e "s?^$WM_PROJECT_DIR?../../..?" )
if [ -n "$FOAM_ONLINE_REPO" ] if [ -n "$FOAM_ONLINE_REPO" ]
then then
filePath=$(echo $1 | sed -e s@^$WM_PROJECT_DIR@$FOAM_ONLINE_REPO@ ) filePath=$(echo "$1" | sed -e "s?^$WM_PROJECT_DIR?$FOAM_ONLINE_REPO?" )
else else
filePath=$realFilePath filePath=$realFilePath
fi fi
# dirName=$(echo "$filePath" | sed -e 's@/[^/]*$@@' ) # dirName=$(echo "$filePath" | sed -e 's?/[^/]*$??' )
dirName=${filePath%/[^/]*} dirName=${filePath%/[^/]*}
fileName=${filePath##*/} fileName=${filePath##*/}
...@@ -62,7 +62,7 @@ then ...@@ -62,7 +62,7 @@ then
# ;; # ;;
esac esac
awk -f $WM_PROJECT_DIR/bin/tools/doxyFilter-table.awk $1 | \ awk -f $WM_PROJECT_DIR/bin/tools/doxyFilter-table.awk "$1" | \
awk -f $awkScript | \ awk -f $awkScript | \
sed -f $WM_PROJECT_DIR/bin/tools/doxyFilter.sed \ sed -f $WM_PROJECT_DIR/bin/tools/doxyFilter.sed \
-e s@%realFilePath%@$realFilePath@g \ -e s@%realFilePath%@$realFilePath@g \
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment