Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2025 closed defect (fixed)

r.kappa: output file saving error on Windows

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 6.4.3
Component: Raster Version: svn-releasebranch64
Keywords: r.kappa Cc:
CPU: Unspecified Platform: MSWindows 7

Description

winGRASS users report that they are unable to save the error matrix and kappa to a file.

Feb 28, 2013 Rebecca wrote:
I have tried both with the GUI and in python script.

I am running it using NX client and so my file paths have '\' symbols to represent directories. When I use the 'browse' icon to locate the correct directory/file, grass automatically uses '\'. However I am receiving the error msg:

Illegal filename. Character </> not allowed.

For a similar report, see also:

http://fromgistors.blogspot.it/2013/07/classification-error-QGIS.html (at page bottom)

Random ideas:

There must be something lacking in the ask() function: http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/lib/gis/ask.c#L345

Perhaps a Windows specific directory separator is needed, similar to

http://trac.osgeo.org/grass/changeset/55135/grass/branches/releasebranch_6_4/lib/g3d

?

Change History (10)

in reply to:  description ; comment:1 by glynn, 11 years ago

Replying to neteler:

Illegal filename. Character </> not allowed.

This was fixed in 7.0 with r32820. I suggest back-porting.

in reply to:  1 ; comment:2 by mmetz, 11 years ago

Replying to glynn:

Replying to neteler:

Illegal filename. Character </> not allowed.

This was fixed in 7.0 with r32820. I suggest back-porting.

Done in r57045,6.

in reply to:  2 ; comment:3 by neteler, 11 years ago

Replying to mmetz:

Replying to glynn:

Replying to neteler:

Illegal filename. Character </> not allowed.

This was fixed in 7.0 with r32820. I suggest back-porting.

Done in r57045,6.

I have made a patch of r32820, diff against relbranch64 attached (recent r.kappa fixes already excluded from r32820 backport).

Please verify the attached diff. It compiles on my (Linux) machine.

in reply to:  3 comment:4 by neteler, 11 years ago

Replying to neteler:

I have made a patch of r32820, diff against relbranch64 attached (recent r.kappa fixes already excluded from r32820 backport).

It additionally requires:

svn rm raster/r.surf.fractal/interface.c

in reply to:  3 ; comment:5 by mmetz, 11 years ago

Replying to neteler:

Replying to mmetz:

Replying to glynn:

Replying to neteler:

Illegal filename. Character </> not allowed.

This was fixed in 7.0 with r32820. I suggest back-porting.

Done in r57045,6.

I have made a patch of r32820, diff against relbranch64 attached (recent r.kappa fixes already excluded from r32820 backport).

G_legal_filename() is meant for GRASS data file names (anything in $GISDASE/$LOCATION_NAME/$MAPSET/<element>/, therefore your patch does not make sense.

in reply to:  5 ; comment:6 by neteler, 11 years ago

Replying to mmetz:

G_legal_filename() is meant for GRASS data file names (anything in $GISDASE/$LOCATION_NAME/$MAPSET/<element>/, therefore your patch does not make sense.

So you mean that the original r32820 doesn't make sense? I just prepared a backport patch...

in reply to:  6 ; comment:7 by mmetz, 11 years ago

Replying to neteler:

Replying to mmetz:

G_legal_filename() is meant for GRASS data file names (anything in $GISDASE/$LOCATION_NAME/$MAPSET/<element>/, therefore your patch does not make sense.

So you mean that the original r32820 doesn't make sense? I just prepared a backport patch...

The original r32820 makes sense because in this case the output is a file anywhere on the file system.

G_legal_filename() is meant for GRASS data file names (anything in GISDASE/$LOCATION_NAME/$MAPSET/<element>/, not for output files located in a user-defined folder.

comment:8 by neteler, 11 years ago

Resolution: fixed
Status: newclosed

OK no problem, proposed backport of r32820 deleted.

The original ticket is solved anyway, closing.

in reply to:  7 comment:9 by glynn, 11 years ago

Replying to mmetz:

G_legal_filename() is meant for GRASS data file names (anything in GISDASE/$LOCATION_NAME/$MAPSET/<element>/, not for output files located in a user-defined folder.

It's meant for anything which will be a single component of a pathname: either an unqualified map name, or a mapset name, or a location name.

Any characters which have "meaning" to GRASS or to the OS are not "legal" in this sense, so it rejects names which contain e.g. "@" (mapset separator) or "/" (directory separator).

comment:10 by neteler, 11 years ago

G_legal_filename() cleanup patch (backport from G7) for GRASS 6 moved to ticket #2031

Note: See TracTickets for help on using tickets.