mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
urllib: a temporary autofree fix
This commit is contained in:
parent
0823ea4af1
commit
77d5fcca59
2 changed files with 16 additions and 4 deletions
|
@ -745,8 +745,12 @@ pub fn (u URL) str() string {
|
|||
// preceded by a dot-segment (e.g., './this:that') to make a relative-
|
||||
// path reference.
|
||||
i := path.index_byte(`:`)
|
||||
if i > -1 && path[..i].index_byte(`/`) == -1 {
|
||||
buf.write_string('./')
|
||||
if i > -1 {
|
||||
// TODO remove this when autofree handles tmp
|
||||
// expressions like this
|
||||
if i > -1 && path[..i].index_byte(`/`) == -1 {
|
||||
buf.write_string('./')
|
||||
}
|
||||
}
|
||||
}
|
||||
buf.write_string(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue