Skip to content

Commit 88c40e0

Browse files
Prometheus2677FPiety0521
authored and
FPiety0521
committed
Merge pull request #143 from coolaj86/url-opaque
use URL.Opaque when available
2 parents e467017 + f2754d9 commit 88c40e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/file/file.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ func (f *File) Open(url string) (source.Driver, error) {
3030

3131
// concat host and path to restore full path
3232
// host might be `.`
33-
p := u.Host + u.Path
33+
p := u.Opaque
34+
if len(p) == 0 {
35+
p = u.Host + u.Path
36+
}
3437

3538
if len(p) == 0 {
3639
// default to current directory if no path

0 commit comments

Comments
 (0)