[GRASS-dev] Re: [GRASS GIS] #676: r.watershed: different output map options do not allow for fully qualified map names

GRASS GIS trac at osgeo.org
Tue Jul 7 09:57:39 EDT 2009


#676: r.watershed: different output map options do not allow for fully qualified
map names
-----------------------+----------------------------------------------------
  Reporter:  mlennert  |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect    |      Status:  new                      
  Priority:  normal    |   Milestone:  6.4.0                    
 Component:  Raster    |     Version:  6.4.0 RCs                
Resolution:            |    Keywords:  r.watershed              
  Platform:  Linux     |         Cpu:  Unspecified              
-----------------------+----------------------------------------------------
Comment (by glynn):

 Replying to [comment:6 mlennert]:

 > IIUC, the problem actually comes from the use of G_legal_filename() in
 these modules (r.reclass is another of them). So the question is: should
 modules check for legality of given file names ?

 File names or map names? G_legal_filename() checks that the argument is
 valid as a single component of the path, i.e. a valid location name,
 mapset name, (unqualified) map name, or element name.

 > And if yes, should they use G_legal_filename().

 Modules shouldn't normally use this function. It's meant for use by low-
 level library functions.

 > And if yes, should G_legal_filename() check for fully qualified names ?

 No. It's called G_legal_filename() rather than e.g. G_legal_map_name()
 because it deals with filenames, not map names.

 If modules are passing map names to it, the modules should be fixed.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/676#comment:7>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list