1
0
Fork 0
mirror of https://github.com/matrix-org/dendrite.git synced 2025-03-28 04:24:28 -05:00

mediaapi/writers: Remove unnecessary comparison to true

This commit is contained in:
Robert Swain 2017-05-22 14:13:57 +02:00
parent 8684f80ebd
commit 6fe6f45093
2 changed files with 2 additions and 2 deletions
src/github.com/matrix-org/dendrite/mediaapi/writers

View file

@ -347,7 +347,7 @@ func (r *downloadRequest) commitFileAndMetadata(tmpDir types.Path, absBasePath t
r.Logger.WithError(err).Error("Failed to move file.")
return updateActiveRemoteRequests
}
if duplicate == true {
if duplicate {
r.Logger.WithField("dst", finalPath).Info("File was stored previously - discarding duplicate")
// Continue on to store the metadata in the database
}

View file

@ -151,7 +151,7 @@ func storeFileAndMetadata(tmpDir types.Path, absBasePath types.Path, mediaMetada
JSON: jsonerror.Unknown(fmt.Sprintf("Failed to upload")),
}
}
if duplicate == true {
if duplicate {
logger.WithField("dst", finalPath).Info("File was stored previously - discarding duplicate")
}