[GRASS-user] r.terraflow error for ASTER DEM.

Markus wrote:

G_convert_dirseps_from_host(G_store(getenv("TEMP")));

is %TEMP% guaranteed to exist in Windows-land?
How does the module react if it is not set and the user stays
with the default or doesn't notice that the default is blank?

Hamish

Hamish wrote:

> G_convert_dirseps_from_host(G_store(getenv("TEMP")));

is %TEMP% guaranteed to exist in Windows-land?

AFAIK, the only way that it won't exist is if the user manually unsets
it. I wouldn't count upon the rest of Window working if you do that,
though; Windows doesn't have a global temporary directory along the
lines of /tmp or /var/tmp.

How does the module react if it is not set and the user stays
with the default or doesn't notice that the default is blank?

If it's not set, getenv() will return NULL and G_store() will
segfault. A check leading to G_fatal_error() can be added to G_store()
if desired (or to the above code).

--
Glynn Clements <glynn@gclements.plus.com>