[GRASS-dev] Re: [GRASS-user] Re: [winGRASS] native winGRASS pre-alpha testers needed

(moved to grass-dev)

benjamin.ducke@ufg.uni-kiel.de wrote on 09/05/2007 11:36 AM:

In addition, GRASS shell scripts and modules should be checked
and hardened for cases where spaces may appear in file or directory names.

On a unix system, users generally don't store stuff in paths with
spaces, but Windows by its very design encourages this.
E.g. the user's home folder may well be something like
...
  
So I'd recommend to do just that: install WinGRASS into a dir with
spaces, create a GRASS mapset, also in a path with spaces, and
work from there to find all the vulnerable bits and pieces.
  

This can be done by Linux/Mac users, too, for testing.
I just changed my grassdata/ to grass data/ and voila... cmd line
startup fails:

both
grass63 "~/grass data/spearfish60/user1"
grass63 ~/grass\ data/spearfish60/user1

fail in line 439 of Init.sh:

+ echo 'GRASS_GUI: text'
+ mv -f /tmp/grass6-neteler-27726/gisrc.27726
/tmp/grass6-neteler-27726/gisrc
+ '[' '!' /ssi0/ssi/neteler/grass ']'

-> data of "grass data" got lost!

The code snippet is:
# Parsing argument to get LOCATION
if [ ! "$1" ] ; then

Apparently we need a trick since "$1" is taking only the first part.
Substitute ' ' earlier in Init.sh with '_' and then replace back?
Probably $@ isn't a good idea.

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------