Skip to content

Commit

Permalink
Do not add volume name
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Jul 30, 2020
1 parent f8bb5b9 commit bf3197b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,6 @@ func run() int {
if flag.NArg() > 0 {
base = flag.Arg(0)

if filepath.VolumeName(base) == "" {
cwd, err := os.Getwd()
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
base = filepath.Join(filepath.VolumeName(cwd), base)
}
base = filepath.FromSlash(filepath.Clean(base))
if runtime.GOOS == "windows" && base != "" && base[0] == '~' {
base = filepath.Join(os.Getenv("USERPROFILE"), base[1:])
Expand Down

0 comments on commit bf3197b

Please sign in to comment.