~alcinnz/hurl

5afbc2d65d98588e076c232c9b5f26dabc744239 — Adrian Cochrane 4 years ago a0a3f38
Correct alternative AppStream icon cache path.
1 files changed, 2 insertions(+), 2 deletions(-)

M src/Network/URI/XDG/AppStream.hs
M src/Network/URI/XDG/AppStream.hs => src/Network/URI/XDG/AppStream.hs +2 -2
@@ 184,7 184,7 @@ el2icon _ el@(XML.Element _ attrs _) = [Icon {

iconURL el@(XML.Element _ attrs _) = case "type" `M.lookup` attrs of
    Just "stock" -> "icon:" `Txt.append` val -- URI scheme NOT implemented
    Just "cached" -> "file:///{usr/share,var/cache}/app-info/icons/*/*/" `Txt.append` val -- FIXME, resolve & provide multiple options.
    Just "cached" -> "file:///{usr/share,var/cache}/app-info/icons/*/*/" `Txt.append` val
    Just "local" -> "file://" `Txt.append` val
    Just "remote" -> val
    _ -> "about:blank"


@@ 195,7 195,7 @@ type IconCache = [FilePath]
scanIconCache :: IO IconCache
scanIconCache = do
    sharePaths <- listDirectory "/usr/share/app-info/icons/" `catch` handleListError
    varPaths <- listDirectory "/usr/share/app-info/icons/" `catch` handleListError
    varPaths <- listDirectory "/var/cache/app-info/icons/" `catch` handleListError
    paths <- forM (sharePaths ++ varPaths) (\x -> listDirectory x `catch` handleListError)
    return (concat paths ++ sharePaths ++ varPaths)