summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Cochrane <adrian@openwork.nz>2020-05-17 13:43:11 +1200
committerAdrian Cochrane <adrian@openwork.nz>2020-05-17 13:43:11 +1200
commit5afbc2d65d98588e076c232c9b5f26dabc744239 (patch)
treef5aa92c85acea5e32d7a55c95bd8bab51462a901
parenta0a3f383b82542bad1a519093e3670fdb3056ba4 (diff)
downloadhurl-5afbc2d65d98588e076c232c9b5f26dabc744239.tar.gz
hurl-5afbc2d65d98588e076c232c9b5f26dabc744239.tar.bz2
hurl-5afbc2d65d98588e076c232c9b5f26dabc744239.zip
Correct alternative AppStream icon cache path.
-rw-r--r--src/Network/URI/XDG/AppStream.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/URI/XDG/AppStream.hs b/src/Network/URI/XDG/AppStream.hs
index 5f165f9..2865795 100644
--- a/src/Network/URI/XDG/AppStream.hs
+++ b/src/Network/URI/XDG/AppStream.hs
@@ -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)