[GRASS-dev] Re: [GRASS GIS] #1042: winGRASS: r.statistics complains
if path to grassdb has spaces
GRASS GIS
trac at osgeo.org
Thu Apr 22 13:23:00 EDT 2010
#1042: winGRASS: r.statistics complains if path to grassdb has spaces
---------------------------+------------------------------------------------
Reporter: ege | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Raster | Version: svn-releasebranch64
Resolution: | Keywords: wingrass
Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by glynn):
Replying to [comment:5 neteler]:
> Other candidates:
>
{{{
d.barscale/main.c: sprintf(cmdbuf, "%s bcolor=%s", cmdbuf,
opt1->answer);
d.barscale/main.c: sprintf(cmdbuf, "%s tcolor=%s", cmdbuf,
opt2->answer);
}}}
The one before that might require it, i.e.:
{{{
sprintf(cmdbuf, "\"%s\" at=%f,%f", argv[0], east, north);
}}}
>
{{{
d.histogram/get_stats.c: cmd = mk_command("r.stats -Cr%s%s \"%s\" >
\"%s\"\n", 4,
d.histogram/get_stats.c: cmd = mk_command("r.stats -r%s%s \"%s\"
nsteps=%s > \"%s\"\n", 5,
...
r.average/main.c: sprintf(command, "%s -anC input=%s,%s fs=space >
\"%s\"",
r.average/main.c: sprintf(command, "%s input=%s output=%s < \"%s\"",
}}}
These are already quoted sufficiently.
>
{{{
d.profile/Range.c: sprintf(stats_cmd, "r.stats -ci %s > %s\n", name,
temp_fname);
}}}
This needs quoting:
{{{
sprintf(stats_cmd, "r.stats -ci %s > \"%s\"", name, temp_fname);
}}}
>
{{{
d.text.new/main.c: sprintf(buf, "%s < %s", G_recreate_command(),
cmd_file);
}}}
So does this:
{{{
sprintf(buf, "%s < \"%s\"", G_recreate_command(), cmd_file);
}}}
>
{{{
r.out.mpeg/main.c: sprintf(cmd, "%s %s 2> /dev/null > /dev/null",
encoder, mpfilename);
r.out.mpeg/main.c: sprintf(cmd, "%s %s 2> /dev/null > /dev/null",
encoder, mpfilename);
r.out.mpeg/main.c: sprintf(cmd, "cd %s; \\ls %s >> %s 2>
/dev/null",
xganim/main.c: sprintf(cmd, "cd %s; \\ls %s >> %s 2> /dev/null",
path, wildarg,
}}}
And all of these; although, I don't think that gee_wildfiles() will work
on Windows in any event, due to Unix-isms. 7.0 uses g.mlist via
G_spawn_ex().
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1042#comment:6>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list