[GRASS-dev] [GRASS GIS] #2445: r.mask -r removal not working in GRASS 7.1 svn r.62210

GRASS GIS trac at osgeo.org
Sat Oct 11 04:46:13 PDT 2014

#2445: r.mask -r removal not working in GRASS 7.1 svn  r.62210
 Reporter:  baharmon     |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.1.0                    
Component:  Raster       |     Version:  svn-trunk                
 Keywords:  r.mask       |    Platform:  MSWindows 8              
      Cpu:  Unspecified  |  

Comment(by glynn):

 Replying to [comment:5 annakrat]:
 > Wontfix?
 No. If a map is recognised as a mask by `Rast__check_for_auto_masking()`,
 then `r.mask -r` should remove it.

 On Windows, remove("MASK") will remove a file named "MASK", "mask",
 "Mask", "MaSK" or any other variation (you can't have more than one of
 those in any given directory).

 Does `g.remove type=rast pattern=MASK` remove the file? If not, that's a
 bug in g.remove. Indeed, this appears to be the problem.

 Looking at source:grass/trunk/lib/gis/ls_filter.c#L151, regcomp() should
 probably be using REG_ICASE on Windows (and also on Unix if GISDBASE is on
 a case-insensitive filesystem, but that's easier said than done).

 IOW, this bug is a consequence of replacing g.remove with g.mremove; the
 former doesn't care about case, the latter does.

Ticket URL: <http://trac.osgeo.org/grass/ticket/2445#comment:6>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list