[GRASS5] [bug #2795] (grass) g.copy exit value

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Dec 7 04:34:04 EST 2004


On Mon, 6 Dec 2004, Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=2795
> -------------------------------------------------------------------------
>
> User does not use -o and gets
> $ g.copy vect=largeA,largeC
> ERROR: <largeC> already exists in mapset <jidanni>
> However, $? is not set, so Makefiles etc. just roll on.

I looked in the code (general/manage/cmd/copy.c) and it seems this 
behaviour is intentional, presumably because you could be copying more 
than one file (e.g. a raster and a vector) in one invocation of the 
command and it will continue and try to copy the others without stopping 
if there is an error in just one. I suppose it's debatable whether this is 
useful.




More information about the grass-dev mailing list