Skip to content
Permalink
Browse files

return error if mapset does not exits

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5024 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 15, 2006
1 parent 5f69737 commit ca29047cff20a0aeec43dbb2c90bd68c857e47b4
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/providers/grass/qgsgrass.cpp
@@ -293,6 +293,12 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse
// Check if the mapset is in use
QString gisBase = getenv("GISBASE");
if ( gisBase.isNull() ) return "GISBASE is not set.";

QFileInfo fi( mapsetPath+ "/WIND" );
if ( !fi.exists() )
{
return mapsetPath + " is not a GRASS mapset.";
}

QString lock = mapsetPath + "/.gislock";
QFile lockFile ( lock );

0 comments on commit ca29047

Please sign in to comment.
You can’t perform that action at this time.