Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Save qgz without qgd if the auxiliary database is empty
  • Loading branch information
pblottiere committed Jun 15, 2021
1 parent bf63165 commit 112fa38
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/core/project/qgsproject.cpp
Expand Up @@ -3365,7 +3365,12 @@ bool QgsProject::zip( const QString &filename )
}
else
{
archive->addFile( asFileName );
// in this case, an empty filename means that the auxiliary database is
// empty, so we don't want to save it
if ( QFile::exists( asFileName ) )
{
archive->addFile( asFileName );
}
}

// create the archive
Expand Down Expand Up @@ -3560,7 +3565,7 @@ bool QgsProject::saveAuxiliaryStorage( const QString &filename )
}
}

if ( !mAuxiliaryStorage->exists( *this ) && filename.isEmpty() && empty )
if ( !mAuxiliaryStorage->exists( *this ) && empty )
{
return true; // it's not an error
}
Expand Down

0 comments on commit 112fa38

Please sign in to comment.