Skip to content

Conversation

justjosias
Copy link
Contributor

Local files can now be loaded by relative path, rather than the
whole path preceded by the file:// scheme indicator. It first
checks whether or not the requested URL has a scheme (by checking
for :// in the URL). If not, it checks to see if the file exists
before opening. It also allows making intention known by
specifying ./ or ../ before the URL, closely matching the
behavior of Firefox.

This borrows code from @singalhimanshu's PR (#232).

Resolves #231

Local files can now be loaded by relative path, rather than the
whole path preceded by the `file://` scheme indicator. It first
checks whether or not the requested URL has a scheme (by checking
for `://` in the URL). If not, it checks to see if the file exists
before opening. It also allows making intention known by
specifying `./` or `../` before the URL, closely matching the
behavior of Firefox.

This borrows code from @singalhimanshu's PR (makew0rld#232).

Resolves makew0rld#231
@makew0rld
Copy link
Owner

Looks good, thank you!

@makew0rld makew0rld merged commit 9c217df into makew0rld:master Dec 8, 2021
makew0rld added a commit that referenced this pull request Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open files with relative path
2 participants