mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Ignore archive files given as layername in command line
This commit is contained in:
parent
67cff3ddd7
commit
1fb9f2ae01
@ -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"
|
||||
@ -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 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user