Browse Source

fix(History): Correct SQL query for empty finished file transfer

"finished" is not a field in file_transfers. Bug has been present since
initially introduced in d9b39b3102.

Had no real effect since file transfers are inserted with initial state
CANCELLED, which is usually the case for a 0-length finished file, but
it still logged an SQL error.
reviewable/pr6585/r1
Anthony Bilinski 3 years ago
parent
commit
2d6cc25405
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 2
      src/persistence/history.cpp

2
src/persistence/history.cpp

@ -355,7 +355,7 @@ RawDatabase::Query History::generateFileFinished(RowId id, bool success, const Q @@ -355,7 +355,7 @@ RawDatabase::Query History::generateFileFinished(RowId id, bool success, const Q
{filePath.toUtf8(), fileHash});
} else {
return RawDatabase::Query(QStringLiteral("UPDATE file_transfers "
"SET finished = %1 "
"SET file_state = %1 "
"WHERE id = %2")
.arg(file_state)
.arg(id.get()));

Loading…
Cancel
Save