diff options
author | Julien Dessaux | 2020-02-12 21:04:55 +0100 |
---|---|---|
committer | Julien Dessaux | 2020-02-12 21:04:55 +0100 |
commit | 211adff0b060023fe0c91e1950d80d3a36d61868 (patch) | |
tree | 2fea7d5d39a6dff4f0276018b9bf23f2debc412c /spool | |
parent | Added tests for job package (diff) | |
download | bareos-zabbix-check-211adff0b060023fe0c91e1950d80d3a36d61868.tar.gz bareos-zabbix-check-211adff0b060023fe0c91e1950d80d3a36d61868.tar.bz2 bareos-zabbix-check-211adff0b060023fe0c91e1950d80d3a36d61868.zip |
Fixed code that used the wrong path manipulation module
Diffstat (limited to '')
-rw-r--r-- | spool/load.go | 4 | ||||
-rw-r--r-- | spool/save.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spool/load.go b/spool/load.go index 282fdc6..5b08bda 100644 --- a/spool/load.go +++ b/spool/load.go @@ -7,7 +7,7 @@ import ( "fmt" "log" "os" - "path" + "path/filepath" "strconv" ) @@ -15,7 +15,7 @@ import ( func (s *Spool) Load(c *config.Config) (err error) { s.config = c // We read the spool - file, err := os.Open(path.Join(c.WorkDir(), spoolFile)) + file, err := os.Open(filepath.Join(c.WorkDir(), spoolFile)) if err != nil { return fmt.Errorf("Couldn't open spool file, starting from scratch: %s", err) } diff --git a/spool/save.go b/spool/save.go index b01dc7b..f25b86a 100644 --- a/spool/save.go +++ b/spool/save.go @@ -4,12 +4,12 @@ import ( "encoding/csv" "fmt" "os" - "path" + "path/filepath" ) // Save writes a spool on the disk func (s *Spool) Save() (err error) { - file, err := os.Create(path.Join(s.config.WorkDir(), spoolFile)) + file, err := os.Create(filepath.Join(s.config.WorkDir(), spoolFile)) if err != nil { return } |