ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
753 stars 137 forks source link

Fix `Bad URL` error when a package is clicked #316

Closed iAmMrinal0 closed 5 years ago

iAmMrinal0 commented 5 years ago

Fixes #314 This happens only when run with --local flag and a package name is clicked as it doesn't have a specific file path in the URL.

decodePathSegments adds an empty string if the path ends with a /

And because of this all (== '.') "" returns True which then makes it a bad path according to the previous logic.

ndmitchell commented 5 years ago

Thanks, fix looks good!