#2025: r.kappa: output file saving error on Windows
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.kappa | Platform: MSWindows 7
Cpu: Unspecified |
-------------------------+--------------------------------------------------
winGRASS users report that they are unable to save the error
matrix and kappa to a file.
Feb 28, 2013 Rebecca wrote:[[BR]]
I have tried both with the GUI and in python script.[[BR]]
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:
#2025: r.kappa: output file saving error on Windows
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.kappa | Platform: MSWindows 7
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by mmetz):
Replying to [comment:1 glynn]:
> Replying to [ticket:2025 neteler]:
>
> > Illegal filename. Character </> not allowed.
>
> This was fixed in 7.0 with r32820. I suggest back-porting.
>
Done in r57045,6.
#2025: r.kappa: output file saving error on Windows
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.kappa | Platform: MSWindows 7
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by neteler):
Replying to [comment:2 mmetz]:
> Replying to [comment:1 glynn]:
> > Replying to [ticket:2025 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.
#2025: r.kappa: output file saving error on Windows
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.kappa | Platform: MSWindows 7
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by neteler):
Replying to [comment:3 neteler]:
> I have made a patch of r32820, diff against relbranch64 attached (recent
r.kappa
> fixes already excluded from r32820 backport).
#2025: r.kappa: output file saving error on Windows
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.kappa | Platform: MSWindows 7
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by mmetz):
Replying to [comment:3 neteler]:
> Replying to [comment:2 mmetz]:
> > Replying to [comment:1 glynn]:
> > > Replying to [ticket:2025 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.
#2025: r.kappa: output file saving error on Windows
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.kappa | Platform: MSWindows 7
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by neteler):
Replying to [comment:5 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...
#2025: r.kappa: output file saving error on Windows
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-releasebranch64
Keywords: r.kappa | Platform: MSWindows 7
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by mmetz):
Replying to [comment:6 neteler]:
> Replying to [comment:5 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.
> 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).