Should use filepath instead of pathx.
This commit is contained in:
parent
7b24de683b
commit
fab51f61ac
2 changed files with 6 additions and 5 deletions
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/surdeus/goblin/src/pathx"
|
||||
"path/filepath"
|
||||
"github.com/surdeus/gomtool/src/mtool"
|
||||
)
|
||||
|
||||
|
@ -24,7 +24,7 @@ func Run(flagSet *mtool.Flags) {
|
|||
mode := os.FileMode(modeArg)
|
||||
for _, path := range args {
|
||||
var e error
|
||||
pth := pathx.From(path).Real()
|
||||
pth := filepath.FromSlash(path)
|
||||
if parentFlag {
|
||||
e = os.MkdirAll(pth, mode)
|
||||
} else {
|
||||
|
|
|
@ -9,7 +9,8 @@ import (
|
|||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/surdeus/goblin/src/pathx"
|
||||
//"github.com/surdeus/goblin/src/pathx"
|
||||
"path/filepath"
|
||||
"github.com/surdeus/gomtool/src/mtool"
|
||||
)
|
||||
|
||||
|
@ -30,7 +31,7 @@ var (
|
|||
|
||||
func handlePath(p string) {
|
||||
if fromReal {
|
||||
p = pathx.FromReal(p).String()
|
||||
p = filepath.ToSlash(p)
|
||||
}
|
||||
if handler != nil {
|
||||
p = handler(p)
|
||||
|
@ -38,7 +39,7 @@ func handlePath(p string) {
|
|||
|
||||
var toPrint string
|
||||
if r {
|
||||
toPrint = pathx.From(p).Real()
|
||||
toPrint = filepath.FromSlash(p)
|
||||
} else {
|
||||
toPrint = p
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue