#1912: g.mapset warns of illegal filename in mapset= but creates the mapset
anyway.
-------------------------+--------------------------------------------------
Reporter: torsti | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: Unspecified |
-------------------------+--------------------------------------------------
See also ticket:1293
{{{
g.mapset -c mapset="möö"
WARNING: Illegal filename <möö>. Character <�> not allowed.
}}}
The mapset is created despite of the warning. You can also switch to
mapsets with illegal filenames.
#1912: g.mapset warns of illegal filename in mapset= but creates the mapset
anyway.
-------------------------+--------------------------------------------------
Reporter: torsti | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by torsti):
Looking at the source it seems the issue is that neither
'''general/g.mapset/main.c''' nor '''lib/gis/make_mapset.c''' include a
call to ''G_legal_name()'' and the mapset dir itself is created with
''G_mkdir()'' which is just a thin wrapper around ''mkdir()''.
So probably '''make_mapset.c''' is what should be patched.
#1912: g.mapset warns of illegal filename in mapset= but creates the mapset
anyway.
-------------------------+--------------------------------------------------
Reporter: torsti | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by martinl):
Replying to [comment:1 torsti]:
> Looking at the source it seems the issue is that neither
'''general/g.mapset/main.c''' nor '''lib/gis/make_mapset.c''' include a
call to ''G_legal_name()'' and the mapset dir itself is created with
''G_mkdir()'' which is just a thin wrapper around ''mkdir()''.
>
> So probably '''make_mapset.c''' is what should be patched.
The warning is printed by the parsers (which calls `G_find_file()`), I
disabled this check (file overwrite) for 'mapset' element in r55612. In
r55608 I added to `G_make_mapset()` check for name legality. Done only in
GRASS 7.
#1912: g.mapset warns of illegal filename in mapset= but creates the mapset
anyway.
-------------------------+--------------------------------------------------
Reporter: torsti | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: g.mapset | Platform: Linux
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by torsti):
g.mapset now (updated up to r55613) behaves as expected, but I noticed
there is a similar issue in make_loc.c and calling e.g. g.proj -c
location=illêgäl still works. Don't really want to open a new ticket,
because it's so similar an issue.
#1912: g.mapset warns of illegal filename in mapset= but creates the mapset
anyway.
-------------------------+--------------------------------------------------
Reporter: torsti | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: g.mapset | Platform: Linux
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by martinl):
Replying to [comment:4 torsti]:
> g.mapset now (updated up to r55613) behaves as expected, but I noticed
there is a similar issue in make_loc.c and calling e.g. g.proj -c
location=illêgäl still works. Don't really want to open a new ticket,
because it's so similar an issue.