Add osutil.Glob to deal with Windows (fixes #1690)

This commit is contained in:
Audrius Butkevicius
2015-04-26 15:41:04 +01:00
parent 15b87ae297
commit d12db3e7b8
10 changed files with 173 additions and 18 deletions

View File

@@ -97,14 +97,14 @@ func (v Simple) Archive(filePath string) error {
}
// Glob according to the new file~timestamp.ext pattern.
newVersions, err := filepath.Glob(filepath.Join(dir, taggedFilename(file, TimeGlob)))
newVersions, err := osutil.Glob(filepath.Join(dir, taggedFilename(file, TimeGlob)))
if err != nil {
l.Warnln("globbing:", err)
return nil
}
// Also according to the old file.ext~timestamp pattern.
oldVersions, err := filepath.Glob(filepath.Join(dir, file+"~"+TimeGlob))
oldVersions, err := osutil.Glob(filepath.Join(dir, file+"~"+TimeGlob))
if err != nil {
l.Warnln("globbing:", err)
return nil