makew0rld / amfora

A fancy terminal browser for the Gemini protocol.
GNU General Public License v3.0
1.14k stars 65 forks source link

Allow opening local files by relative path #257

Closed justjosias closed 2 years ago

justjosias commented 2 years ago

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

makew0rld commented 2 years ago

Looks good, thank you!