Details Ticket 4787


Comment | Reply | Open


Serial Number 4787
Subject Path not found in Mac when Directory has spaces in the name
Area grass6
Queue grass
Requestors adiez@uv.es
Owner mbarton
Status resolved
Last User Contact Tue Jul 4 22:09:20 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Thu Jul 20 22:58:13 2006 (2 yr ago)
Created Tue Jul 4 16:13:51 2006 (2 yr ago)

Transaction History Ticket 4787


Tue, Jul 4 2006 16:13:51    Request created by guest  
Subject: Path not found in Mac when Directory has spaces in the name

Platform: Mac OSX
grass obtained from: Trento Italy site
grass binary for platform: Downloaded precompiled Binaries

Agustin Diez-Castillo
When saving a display I got this message
rm: /Volumes/Home: No such file or directory
rm: Directory/neolitic/disco/AC_JACIMENTS/prospecciomay2006/mapa_04_07_2006.ppm:
No such file or directory
# but it should be 
/Volumes/Home\ Directory/neolitic/disco/AC_JACIMENTS/prospecciomay2006/mapa_04_07_2006.ppm
# or 
'/Volumes/Home Directory/neolitic/disco/AC_JACIMENTS/prospecciomay2006/mapa_04_07_2006.ppm'
while executing
"exec rm /Volumes/Home Directory/neolitic/disco/AC_JACIMENTS/prospecciomay2006/mapa_04_07_2006.ppm"
("eval" body line 1)
    invoked from within
"eval exec "rm $path.ppm""
    ("jpg" arm line 3)
    invoked from within
"switch $type {
			"ppm" {
				return
			}
			"tif" { 
				eval exec {gdal_translate $path.ppm $path.tif -of GTIFF}
				eval exec "rm $path.ppm"
			}
	..."
    (procedure "MapToolBar::savefile" line 22)
    invoked from within
"MapToolBar::savefile jpg 95"
    invoked from within
".mapcan(1).mf.topf.tb0.mapsave.sf.jpg invoke active"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke active]"
    (procedure "tk::MenuInvoke" line 50)
    invoked from within
"tk::MenuInvoke .mapcan(1).mf.topf.tb0.mapsave.sf.jpg 1"
    (command bound to event)
Tue, Jul 4 2006 22:09:20    Mail sent by glynn@gclements.plus.com  
Return-Path <glynn@gclements.plus.com>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn@gclements.plus.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <17578.51949.33977.668592@cerise.gclements.plus.com>
Date Tue, 4 Jul 2006 21:09:17 +0100
To Request Tracker <grass-bugs@intevation.de>
Cc grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #4787] (grass) Path not found in Mac when Directory has spaces in the name
In-Reply-To <20060704141351.B74A01005CA@lists.intevation.de>
References <20060704141351.B74A01005CA@lists.intevation.de>
X-Mailer VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.281 tagged_above=-999 required=4 tests=[AWL=1.453, BAYES_00=-5, FORGED_RCVD_HELO=0.266]
X-Spam-Level
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@gclements.plus.com>


Mon, Jul 17 2006 16:56:31    Owner changed to mbarton by mneteler  
Thu, Jul 20 2006 22:58:13    Status changed to resolved by mbarton  
Comment | Reply | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request