From 211adff0b060023fe0c91e1950d80d3a36d61868 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 12 Feb 2020 21:04:55 +0100 Subject: Fixed code that used the wrong path manipulation module --- config/statefile.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config/statefile.go') diff --git a/config/statefile.go b/config/statefile.go index 8b9f0a9..22fd214 100644 --- a/config/statefile.go +++ b/config/statefile.go @@ -4,7 +4,7 @@ import ( "fmt" "log" "os" - "path" + "path/filepath" ) const ( @@ -15,17 +15,17 @@ const ( func (c *Config) checkStateFile() { // Finds the state file to parse if c.stateFile != "" { - c.stateFile = path.Join(c.workDir, c.stateFile) + c.stateFile = filepath.Join(c.workDir, c.stateFile) info, err := os.Stat(c.stateFile) if os.IsNotExist(err) || info.IsDir() { fmt.Printf("INFO The state file %s does not exist.\n", c.stateFile) os.Exit(0) } } else { - c.stateFile = path.Join(c.workDir, bareosStateFile) + c.stateFile = filepath.Join(c.workDir, bareosStateFile) info, err := os.Stat(c.stateFile) if os.IsNotExist(err) || info.IsDir() { - c.stateFile = path.Join(c.workDir, baculaStateFile) + c.stateFile = filepath.Join(c.workDir, baculaStateFile) info, err = os.Stat(c.stateFile) if os.IsNotExist(err) || info.IsDir() { fmt.Println("INFO Could not find a suitable state file. Has a job ever run?") -- cgit v1.2.3