diff options
Diffstat (limited to 'Presence')
-rw-r--r-- | Presence/Presence.hs | 3 |
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) |