Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3000 closed defect (fixed)

i.gensig overwrites signature file without warning

Reported by: marisn Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Imagery Version: svn-trunk
Keywords: i.gensig Cc:
CPU: Unspecified Platform: Unspecified

Description

Although it is not a huge issue, overwriting output files without asking for confirmation goes against the spirit of GRASS GIS.

An --overwrite flag should be implemented for i.gensig for signature file.

Change History (4)

comment:1 by neteler, 8 years ago

Milestone: 7.1.07.2.0

Milestone renamed

in reply to:  description comment:2 by mmetz, 8 years ago

Replying to marisn:

Although it is not a huge issue, overwriting output files without asking for confirmation goes against the spirit of GRASS GIS.

An --overwrite flag should be implemented for i.gensig for signature file.

Please try r68415 (changes in lib/imagery).

comment:3 by marisn, 8 years ago

Resolution: fixed
Status: newclosed

In 68434:

Imagery modules: Ask to overwrite signature files. Fixes #3000

comment:4 by marisn, 8 years ago

Sorry, that change is wrong as it will check for file presence only if OVERWRITE is set and fail to do so if it is unset (usual case). I reverted it in r68432

I implemented a new function to find signature files in r68433 to not change I_find_subgroup_file function within 7.x lifetime. Good question if all hardcoded directory separators in lib/imagery should not be replaced with HOST_DIRSEP as it is done in r68433 to match how G_file_name works. Needs testing on Windows.

As of r68434 all (I hope) signatures generating modules perform check to not overwrite signature file.

Note: See TracTickets for help on using tickets.