Skip to content
Permalink
Browse files

return error if mapset does not exits

git-svn-id: http://svn.osgeo.org/qgis/trunk@5024 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 15, 2006
1 parent 028f880 commit ef8166cafd9cf556df0c517820caab7e48278a54
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 ef8166c

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