Skip to content

Commit 1fb9f2a

Browse files
committedOct 9, 2017
Ignore archive files given as layername in command line
1 parent 67cff3d commit 1fb9f2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/app/main.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ typedef SInt32 SRefCon;
9898
#include "qgsvectorlayer.h"
9999
#include "qgis_app.h"
100100
#include "qgscrashhandler.h"
101+
#include "qgsziputils.h"
101102

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

0 commit comments

Comments
 (0)
Please sign in to comment.