Index: scripts/r.fillnulls/r.fillnulls
===================================================================
--- scripts/r.fillnulls/r.fillnulls	(revision 46565)
+++ scripts/r.fillnulls/r.fillnulls	(working copy)
@@ -82,7 +82,7 @@
 
 eval `g.gisenv`
 : ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?}
-LOCATION=$GISDBASE/$LOCATION_NAME/$MAPSET
+LOCATION="$GISDBASE/$LOCATION_NAME/$MAPSET"
 
 # what to do in case of user break:
 exitprocedure()
@@ -93,7 +93,7 @@
  g.remove vect=${VECTTMP} > /dev/null
  
  #restore user mask if present:
- if test -f $LOCATION/cell/$USERMASK ; then
+ if test -f "$LOCATION/cell/$USERMASK" ; then
   g.remove rast=MASK > /dev/null
   g.rename $USERMASK,MASK > /dev/null
  fi
@@ -116,7 +116,8 @@
 
 #check if input file exists
 #if test -f $LOCATION/cell/$GIS_OPT_INPUT
-if [ -z `g.findfile elem=cell file="$GIS_OPT_INPUT" | grep ^file | cut -f2 -d=` ] ; then
+filelist=`g.findfile elem=cell file="$GIS_OPT_INPUT" | grep ^file | cut -f2 -d=`
+if [ -z "$filelist" ] ; then
     g.message -e "<$GIS_OPT_INPUT> does not exist! Aborting."
     exit 1
 fi
@@ -124,7 +125,7 @@
 #check if a MASK is already present:
 MASKTMP=mask.$$
 USERMASK=usermask_${MASKTMP}
-if test -f $LOCATION/cell/MASK
+if test -f "$LOCATION/cell/MASK"
 then
  g.message "A user raster mask (MASK) is present. Saving it..."
  g.rename MASK,$USERMASK > /dev/null
@@ -186,7 +187,7 @@
   g.remove MASK > /dev/null
 
   #restoring user's mask, if present:
-  if test -f $LOCATION/cell/$USERMASK
+  if test -f "$LOCATION/cell/$USERMASK"
   then
    g.message "Restoring user mask (MASK)..."
    g.rename $USERMASK,MASK > /dev/null
@@ -203,7 +204,7 @@
 #remove internal MASK first -- WHY???? MN 10/2005
 g.remove MASK > /dev/null
 
-if test -f $LOCATION/cell/$USERMASK
+if test -f "$LOCATION/cell/$USERMASK"
 then
   g.message "Using user mask while interpolating"
   RST_CMD="v.surf.rst zcol=value tension=$GIS_OPT_TENSION smooth=$GIS_OPT_SMOOTH maskmap=$USERMASK"
@@ -224,7 +225,7 @@
 g.message "Note: Above warnings may be ignored."
 
 #restoring user's mask, if present:
-if test -f $LOCATION/cell/$USERMASK
+if test -f "$LOCATION/cell/$USERMASK"
 then
  g.message "Restoring user mask (MASK)..."
  g.rename $USERMASK,MASK > /dev/null
