Keep checksum of not compressed index file even if it's not uploaded

Fixes: #756
This commit is contained in:
Andrey Smirnov committed 2018-07-14 00:17:36 +03:00
1 parent b0be6c8a7a
commit 747b9752ce
5 files changed
+44 -1

No files matched your search

+4 -1
View File
@@ -77,14 +77,17 @@ func (file *indexFile) Finalize(signer pgp.Signer) error {
file.tempFile.Close()
exts := []string{""}
cksumExts := exts
if file.compressable {
exts = append(exts, ".gz", ".bz2")
cksumExts = exts
if file.onlyGzip {
exts = []string{".gz"}
cksumExts = []string{"", ".gz"}
}
}
for _, ext := range exts {
for _, ext := range cksumExts {
var checksumInfo utils.ChecksumInfo
checksumInfo, err = utils.ChecksumsForFile(file.tempFilename + ext)