Fix filename.
This commit is contained in:
parent
723cb6bdb6
commit
ee60339b2d
1 changed files with 3 additions and 0 deletions
3
file.go
3
file.go
|
@ -334,6 +334,9 @@ func splitDirAndName(path string) (dir, name string, err error) {
|
|||
return path, "", nil
|
||||
}
|
||||
dir, name = filepath.Split(path)
|
||||
if dir == "" {
|
||||
return "", name, nil
|
||||
}
|
||||
_, err = os.Stat(dir)
|
||||
return dir, name, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue