dbhub: Fix saving latest commit to file

Fix the "Save Revision to File" action in the context menu of the
commits list so it also allows downloading the latest commit.

See issue #2349.
This commit is contained in:
Martin Kleusberg
2020-08-12 16:15:24 +02:00
parent 70eb15a8e2
commit d76d6c2584

View File

@@ -245,7 +245,7 @@ void RemoteDock::fetchDatabase(QString url_string, RemoteNetwork::RequestType re
// There is a chance that we've already cloned that database. So check for that first
QString exists = remoteDatabase.localExists(url, remoteModel->currentClientCertificate(), QUrlQuery(url).queryItemValue("branch").toStdString());
if(!exists.isEmpty())
if(!exists.isEmpty() && request_type == RemoteNetwork::RequestTypeDatabase)
{
// Database has already been cloned! So open the local file instead of fetching the one from the
// server again.