fix warning
This commit is contained in:
parent
001d82f953
commit
ad6fee422a
1 changed files with 6 additions and 6 deletions
|
@ -65,7 +65,13 @@ sshInputAForm hostnamefield def = SshInput
|
||||||
<*> aopt textField "Directory" (Just $ Just $ fromMaybe (T.pack gitAnnexAssistantDefaultDir) $ inputDirectory def)
|
<*> aopt textField "Directory" (Just $ Just $ fromMaybe (T.pack gitAnnexAssistantDefaultDir) $ inputDirectory def)
|
||||||
<*> areq intField "Port" (Just $ inputPort def)
|
<*> areq intField "Port" (Just $ inputPort def)
|
||||||
where
|
where
|
||||||
|
check_username = checkBool (all (`notElem` "/:@ \t") . T.unpack)
|
||||||
|
bad_username textField
|
||||||
|
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
|
bad_hostname = "cannot resolve host name" :: Text
|
||||||
|
bad_username = "bad user name" :: Text
|
||||||
|
|
||||||
check_hostname = checkM (liftIO . checkdns) hostnamefield
|
check_hostname = checkM (liftIO . checkdns) hostnamefield
|
||||||
checkdns t = do
|
checkdns t = do
|
||||||
let h = T.unpack t
|
let h = T.unpack t
|
||||||
|
@ -83,12 +89,6 @@ sshInputAForm hostnamefield def = SshInput
|
||||||
check_hostname = hostnamefield -- unchecked
|
check_hostname = hostnamefield -- unchecked
|
||||||
#endif
|
#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
|
data ServerStatus
|
||||||
= UntestedServer
|
= UntestedServer
|
||||||
| UnusableServer Text -- reason why it's not usable
|
| UnusableServer Text -- reason why it's not usable
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue