Fixed code that used the wrong path manipulation module
This commit is contained in:
parent
88757ef736
commit
211adff0b0
4 changed files with 10 additions and 10 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue