[Qgis-developer] Preventing bad raster filenames - advice?

Nyall Dawson nyall.dawson at gmail.com
Tue May 7 20:12:29 PDT 2013


Hi all,

I'm after some quick advice - in investigating
http://hub.qgis.org/issues/7624 I've tracked the crash down to users
entering a destination raster filename without a path (only occurs
under Windows). If they use the "..." button next to the filename
field then the full path is correctly filled in and no crash occurs.

While the bug report is specifically for the heatmap plugin I've since
noticed this behaviour applies to some other areas too, such as the
raster calculator dialog.

I'm thinking it's probably best to make the file name edits read only,
so the only way to choose a destination file is by clicking the ...
button and using the file chooser dialog. This will force the
destination filename to be a full absolute path. (After all, if a user
enters a relative path for the destination there's no way of
identifying what they'd like it to be relative to..! The input file?
The project?)

Before I make this change, does anyone have any ideas on alternative
ways to handle this situation?

Nyall


More information about the Qgis-developer mailing list