[GRASS-dev] Re: [GRASS GIS] #767: g.copy only issues warning when
destination exists
GRASS GIS
trac at osgeo.org
Mon Aug 22 09:59:35 EDT 2011
#767: g.copy only issues warning when destination exists
------------------------------+---------------------------------------------
Reporter: ferrouswheel | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Default | Version: svn-develbranch6
Keywords: g.copy, g.rename | Platform: Unspecified
Cpu: Unspecified |
------------------------------+---------------------------------------------
Comment(by glynn):
Replying to [comment:4 hamish]:
> G_fatal_error() seems like the right thing to do AFAICT.
One issue is that, with multiple map names, it will abort at the first
case where the destination exists. Maps prior to that will be copied, maps
after that won't be.
The existing behaviour is more consistent: maps which can be copied are
copied; errors only affect the specific copy operation to which they
apply.
The existing behaviour differs from modules which use
->gisprompt="new,..." (which g.copy can't do because of its interface; see
#178). With those, the parser checks either that --overwrite was used or
that none of the "new" maps exist. If the check fails, it fails in
G_parser(), before the module starts to do any work.
If we want the "usual" behaviour from g.copy and g.rename, they will need
to loop over the inputs twice: the first time to check for errors, the
second time to actually perform the copy/rename operations.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/767#comment:5>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list