Skip to content

Commit f2754d9

Browse files
Prometheus2677FPiety0521
authored and
FPiety0521
committed
use URL.Opaque when available
1 parent e467017 commit f2754d9

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)