Skip to content

Commit

Permalink
Fix filename.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces committed Apr 22, 2023
1 parent 723cb6b commit ee60339
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit ee60339

Please sign in to comment.