Skip to content

Commit c3da500

Browse files
authored
Merge pull request #40 from rofinn/rf/filepathsbase-updates
Update to the new release of FilePathsBase
2 parents 7ce79b1 + ec815d1 commit c3da500

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1010
URIParser = "30578b45-9adc-5946-b283-645ec420af67"
1111

1212
[compat]
13-
FilePathsBase = "0.5"
13+
FilePathsBase = "0.6"
1414

1515
[extras]
1616
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

src/uri.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
function URIParser.URI(p::AbstractPath; query="", fragment="")
2-
if isempty(root(p))
2+
if isempty(p.root)
33
throw(ArgumentError("$p is not an absolute path"))
44
end
55

66
b = IOBuffer()
77
print(b, "file://")
88

9-
if !isempty(drive(p))
9+
if !isempty(p.drive)
1010
print(b, "/")
11-
print(b, drive(p))
11+
print(b, p.drive)
1212
end
1313

14-
for i=2:length(p.parts)
14+
for s in p.segments
1515
print(b, "/")
16-
print(b, URIParser.escape(p.parts[i]))
16+
print(b, URIParser.escape(s))
1717
end
1818

1919
return URIParser.URI(URIParser.URI(String(take!(b))); query=query, fragment=fragment)

0 commit comments

Comments
 (0)