From 01291f7cb500bedcb23d2bcd27a1d91cb3b70dcd Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 20 Dec 2018 15:08:49 -0700 Subject: [PATCH] use URL.Opaque when available --- source/file/file.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/file/file.go b/source/file/file.go index ce43a49..1f5b882 100644 --- a/source/file/file.go +++ b/source/file/file.go @@ -30,7 +30,10 @@ func (f *File) Open(url string) (source.Driver, error) { // concat host and path to restore full path // host might be `.` - p := u.Host + u.Path + p := u.Opaque + if len(p) == 0 { + p = u.Host + u.Path + } if len(p) == 0 { // default to current directory if no path