Periodic pairsLastUpdated timestamp update

Fix other GoReportCard warnings
This commit is contained in:
Adrian Gallagher
2018-12-27 15:32:59 +11:00
parent 046e15a67e
commit dffa8eca99
12 changed files with 118 additions and 94 deletions

View File

@@ -1015,10 +1015,15 @@ func GetFilePath(file string) (string, error) {
}
data, err := common.ReadFile(newDirs[x])
if err != nil {
return "", err
}
if ConfirmECS(data) {
if path.Ext(newDirs[x]) == ".dat" {
return newDirs[x], nil
}
err = os.Rename(newDirs[x], newDirs[1])
if err != nil {
return "", err
@@ -1029,10 +1034,12 @@ func GetFilePath(file string) (string, error) {
if path.Ext(newDirs[x]) == ".json" {
return newDirs[x], nil
}
err = os.Rename(newDirs[x], newDirs[0])
if err != nil {
return "", err
}
return newDirs[0], nil
}