File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1205,7 +1205,6 @@ void QFieldCloudProjectsModel::projectDownloadFiles( const QString &projectId )
1205
1205
1206
1206
NetworkReply *reply = downloadFile ( projectId, fileName );
1207
1207
QTemporaryFile *file = new QTemporaryFile ( reply );
1208
-
1209
1208
file->setAutoRemove ( false );
1210
1209
1211
1210
if ( !file->open () )
@@ -1267,7 +1266,9 @@ bool QFieldCloudProjectsModel::projectMoveDownloadedFilesToPermanentStorage( con
1267
1266
}
1268
1267
1269
1268
if ( !file.remove () )
1269
+ {
1270
1270
QgsMessageLog::logMessage ( QStringLiteral ( " Failed to remove temporary file `%1`" ).arg ( fileName ) );
1271
+ }
1271
1272
}
1272
1273
1273
1274
return !hasError;
@@ -1832,6 +1833,8 @@ void QFieldCloudProjectsModel::downloadFileConnections( const QString &projectId
1832
1833
errorMessageDetail = file.errorString ();
1833
1834
errorMessage = tr ( " File system error. Failed to write file to temporary location `%1`." ).arg ( temporaryFileName );
1834
1835
}
1836
+
1837
+ file.close ();
1835
1838
}
1836
1839
else
1837
1840
{
You can’t perform that action at this time.
0 commit comments