Skip to content

Commit

Permalink
return error if mapset does not exits
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@5024 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Mar 15, 2006
1 parent 028f880 commit ef8166c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/providers/grass/qgsgrass.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit ef8166c

Please sign in to comment.