#
# HELP: SYNOPSIS:
# HELP:     colotux/menu/save
# HELP:
# HELP: DESCRIPTION:
# HELP:     Ask for a volume file name and save current volume to it.
# HELP:     Ask for confirmation, if required.
#
CECHO ${$root.func.var.new("string","tmp")}
CECHO ${$root.func.var.new("string","tmp2")}
VARFROMPROCESS tmp eccet_openfile save ${$root.func.strings.quote($root.application.colotux.datapath)}
IF ${$tmp=="."} QUIT
CECHO ${$tmp2="1"}
IF ${$root.func.file.exists($tmp)} VARFROMPROCESS tmp2 eccet_confirm 300 60 "File exists - overwrite?"
IF ${$tmp2=="0"} QUIT
CECHO ${$root.application.colotux.datapath=$root.func.file.getdir($tmp)}
VIEW_SET Main
SAVE ${$root.func.strings.quote($tmp)}
VIEW_RENDER
if ${$root.rc!=0} ECHO SAVE FAILED.
