use URL.Opaque when available

This commit is contained in:
AJ ONeal 2018-12-20 15:08:49 -07:00
parent e8b8975ec3
commit 01291f7cb5
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,10 @@ func (f *File) Open(url string) (source.Driver, error) {
// concat host and path to restore full path // concat host and path to restore full path
// host might be `.` // host might be `.`
p := u.Host + u.Path p := u.Opaque
if len(p) == 0 {
p = u.Host + u.Path
}
if len(p) == 0 { if len(p) == 0 {
// default to current directory if no path // default to current directory if no path