Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add QIODevice::Truncate for opening a new file
  • Loading branch information
pblottiere committed Jul 31, 2017
1 parent 576afe5 commit a0a2f0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsproject.cpp
Expand Up @@ -2137,7 +2137,7 @@ bool QgsProject::zip( const QString &filename )
QFile qgsFile( QDir( archive->dir() ).filePath( qgsFileName ) );

bool writeOk;
if ( qgsFile.open( QIODevice::WriteOnly ) )
if ( qgsFile.open( QIODevice::WriteOnly | QIODevice::Truncate ) )
{
const QString originalFilename = mFile.fileName();
mFile.setFileName( qgsFile.fileName() );
Expand Down

0 comments on commit a0a2f0c

Please sign in to comment.