[GRASS-dev] [bug #4787] (grass) Path not found in Mac when Directory has spaces in the name

Glynn Clements glynn at gclements.plus.com
Tue Jul 4 16:09:17 EDT 2006


Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=4787
> -------------------------------------------------------------------------
> 
> Subject: Path not found in Mac when Directory has spaces in the name

> 			"tif" { 
> 				eval exec {gdal_translate $path.ppm $path.tif -of GTIFF}
> 				eval exec "rm $path.ppm"
> 			}

This is a good example of how /not/ to use "exec" in Tcl. A command is
a list of strings, not a string. This issue plagues Bourne-shell
scripts do the lack of support for lists. Tcl has lists, so there's no
reason for this type of issue to arise.

The above should be:

	exec gdal_translate $path.ppm $path.tif -of GTIFF
	exec rm $path.ppm

I strongly suspect that the same issue applies to most (if not all) of
the other occurrences of "eval exec ..." in gis.m (a quick "grep"
finds 50 of them).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list