fix warning

This commit is contained in:
Joey Hess 2013-05-04 16:36:51 -04:00
parent 001d82f953
commit ad6fee422a

View file

@ -65,7 +65,13 @@ sshInputAForm hostnamefield def = SshInput
<*> aopt textField "Directory" (Just $ Just $ fromMaybe (T.pack gitAnnexAssistantDefaultDir) $ inputDirectory def)
<*> areq intField "Port" (Just $ inputPort def)
where
check_username = checkBool (all (`notElem` "/:@ \t") . T.unpack)
bad_username textField
#ifndef __ANDROID__
bad_hostname = "cannot resolve host name" :: Text
bad_username = "bad user name" :: Text
check_hostname = checkM (liftIO . checkdns) hostnamefield
checkdns t = do
let h = T.unpack t
@ -83,12 +89,6 @@ sshInputAForm hostnamefield def = SshInput
check_hostname = hostnamefield -- unchecked
#endif
check_username = checkBool (all (`notElem` "/:@ \t") . T.unpack)
bad_username textField
bad_hostname = "cannot resolve host name" :: Text
bad_username = "bad user name" :: Text
data ServerStatus
= UntestedServer
| UnusableServer Text -- reason why it's not usable