let ask_port state =
match
inputbox "Remote port" "Remote port" 10 50
- (Option.default "" state.remote_port)
+ (Option.default "22" state.remote_port)
with
| Yes ([]|""::_) -> Next { state with remote_port = Some "22" }
| Yes (port::_) -> Next { state with remote_port = Some port }
in
let ask_directory state =
+ let default_dir = "/var/lib/xen/images" in
match
inputbox "Remote directory" "Remote directory" 10 50
- (Option.default "" state.remote_directory)
+ (Option.default default_dir state.remote_directory)
with
- | Yes [] ->
- Next { state with remote_directory = Some "/var/lib/xen/images" }
+ | Yes ([]|""::_) -> Next { state with remote_directory = Some default_dir }
| Yes (dir::_) -> Next { state with remote_directory = Some dir }
| No | Help | Error -> Ask_again
| Back -> Prev