mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Add QIODevice::Truncate for opening a new file
This commit is contained in:
parent
576afe5aa3
commit
a0a2f0c539
@ -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() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user