Skip to content

Commit

Permalink
check root directory with filepath.Separator excluded volume name
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Apr 15, 2018
1 parent f56a3bf commit 48a1aa2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/grapicmd/util/fs/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ func LookupRoot(fs afero.Fs, dir string) (string, bool) {
return dir, true
}

if dir == "/" {
p := dir[len(filepath.VolumeName(dir)):]
if p == string(filepath.Separator) {
return "", false
}

Expand Down

0 comments on commit 48a1aa2

Please sign in to comment.