pull/184/head
Simon Let 3 years ago
parent baf7cdedc5
commit eb731e5bf9
  1. 8
      internal/collect/collect.go
  2. 2
      internal/histio/histio.go

@ -83,17 +83,17 @@ func ReadFileContent(logger *zap.Logger, path string) string {
}
// GetGitDirs based on result of git "cdup" command
func GetGitDirs(logger *zap.Logger, cdup string, exitCode int, pwd string) (string, string) {
func GetGitDirs(logger *zap.Logger, cdUp string, exitCode int, pwd string) (string, string) {
if exitCode != 0 {
return "", ""
}
abspath := filepath.Clean(filepath.Join(pwd, cdup))
realpath, err := filepath.EvalSymlinks(abspath)
absPath := filepath.Clean(filepath.Join(pwd, cdUp))
realPath, err := filepath.EvalSymlinks(absPath)
if err != nil {
logger.Error("Error while handling git dir paths", zap.Error(err))
return "", ""
}
return abspath, realpath
return absPath, realPath
}
// GetTimezoneOffsetInSeconds based on zone returned by date command

@ -24,7 +24,7 @@ func New(sugar *zap.SugaredLogger, dataDir, deviceID string) *Histio {
sugarHistio := sugar.With(zap.String("component", "histio"))
histDir := path.Join(dataDir, "history")
currPath := path.Join(histDir, deviceID)
// TODO: file extenstion for the history, yes or no? (<id>.reshjson vs. <id>)
// TODO: file extension for the history, yes or no? (<id>.reshjson vs. <id>)
// TODO: discover other history files, exclude current

Loading…
Cancel
Save