Skip to content

Commit

Permalink
Ignore archive files given as layername in command line
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Oct 9, 2017
1 parent 67cff3d commit 1fb9f2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/main.cpp
Expand Up @@ -98,6 +98,7 @@ typedef SInt32 SRefCon;
#include "qgsvectorlayer.h"
#include "qgis_app.h"
#include "qgscrashhandler.h"
#include "qgsziputils.h"

#include "qgsuserprofilemanager.h"
#include "qgsuserprofile.h"
Expand Down Expand Up @@ -1169,7 +1170,8 @@ int main( int argc, char *argv[] )
{
QgsDebugMsg( QString( "Trying to load file : %1" ).arg( layerName ) );
// don't load anything with a .qgs extension - these are project files
if ( !layerName.endsWith( QLatin1String( ".qgs" ), Qt::CaseInsensitive ) )
if ( !layerName.endsWith( QLatin1String( ".qgs" ), Qt::CaseInsensitive )
&& !QgsZipUtils::isZipFile( layerName ) )
{
qgis->openLayer( layerName );
}
Expand Down

0 comments on commit 1fb9f2a

Please sign in to comment.