Use unique versions in staggered versioner (fixes #1063)

This commit is contained in:
Audrius Butkevicius
2014-12-02 18:53:38 +00:00
parent bc8907e90d
commit 3cbe92d797
3 changed files with 17 additions and 7 deletions

View File

@@ -18,7 +18,6 @@ package versioner
import (
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"sync"
@@ -357,9 +356,7 @@ func (v Staggered) Archive(filePath string) error {
// Use all the found filenames.
versions := append(oldVersions, newVersions...)
sort.Strings(versions)
v.expire(versions)
v.expire(uniqueSortedStrings(versions))
return nil
}