summaryrefslogtreecommitdiff
path: root/Presence
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2018-05-23 23:43:23 +0000
committerJames Crayne <jim.crayne@gmail.com>2018-05-23 23:43:23 +0000
commit32d1428b8ca30a8d8fb334a126895afe5f54b611 (patch)
tree28e1a094d07c4912ff51059462ea58c4f798a1c1 /Presence
parent9d66c754088fd935e56ad2bdd91721ba93e809a7 (diff)
fix build on earlier directory package
Diffstat (limited to 'Presence')
-rw-r--r--Presence/Presence.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Presence/Presence.hs b/Presence/Presence.hs
index c614cc4e..f1bae255 100644
--- a/Presence/Presence.hs
+++ b/Presence/Presence.hs
@@ -234,6 +234,9 @@ chooseResourceName state k addr clientsNameForMe desired = do
234 case Text.splitAt 43 wanted_profile0 of 234 case Text.splitAt 43 wanted_profile0 of
235 (pub,".tox") -> do 235 (pub,".tox") -> do
236 cdir <- ConfigFiles.configPath (L.fromChunks [Text.encodeUtf8 user]) "." "" 236 cdir <- ConfigFiles.configPath (L.fromChunks [Text.encodeUtf8 user]) "." ""
237#if !MIN_VERSION_directory(1,2,5)
238 let listDirectory path = filter (`notElem` [".",".."]) <$> getDirectoryContents path
239#endif
237 cfs <- map Text.pack <$> listDirectory cdir `catchIOError` (\e -> return []) 240 cfs <- map Text.pack <$> listDirectory cdir `catchIOError` (\e -> return [])
238 let profiles = filter (\f -> Text.toLower f == Text.toLower wanted_profile0) cfs 241 let profiles = filter (\f -> Text.toLower f == Text.toLower wanted_profile0) cfs
239 -- hPutStrLn stderr $ "Toxmpp profile " ++ show (user,wanted_profile0,profiles,cfs) 242 -- hPutStrLn stderr $ "Toxmpp profile " ++ show (user,wanted_profile0,profiles,cfs)