Skip to content

Commit

Permalink
Use path/filepath instead of path
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsheep committed Feb 24, 2022
1 parent 7d16b42 commit a6d7577
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"
"os"
"path"
"path/filepath"

"github.com/mitchellh/go-homedir"
"github.com/quantumsheep/sshs/ui"
Expand Down Expand Up @@ -82,7 +82,7 @@ func run(cmd *cobra.Command, args []string) {

func createFileRecursive(filename string) error {
if _, e := os.Stat(filename); os.IsNotExist(e) {
if e := os.MkdirAll(path.Dir(filename), os.ModePerm); e != nil {
if e := os.MkdirAll(filepath.Dir(filename), os.ModePerm); e != nil {
return e
}

Expand Down

0 comments on commit a6d7577

Please sign in to comment.