Skip to content
Permalink
Browse files

Add QIODevice::Truncate for opening a new file

  • Loading branch information
pblottiere committed Jul 13, 2017
1 parent 576afe5 commit a0a2f0c5397d5742b7c10fc2582488d1f634ed32
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsproject.cpp
@@ -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() );

0 comments on commit a0a2f0c

Please sign in to comment.
You can’t perform that action at this time.