Update sync session docs

This commit is contained in:
Harshavardhana
2015-06-20 21:53:59 -07:00
parent 0841eba62b
commit 33afbbc4e9
2 changed files with 11 additions and 3 deletions
+10 -3
View File
@@ -46,7 +46,14 @@ FLAGS:
{{end}}{{ end }}
EXAMPLES:
-- TODO --
1. List sessions
$ mc {{.Name}} session list
2. Resume session
$ mc {{.Name}} session resume [SESSION]
3. Clear session
$ mc {{.Name}} session clear [SESSION]|[*]
`,
}
@@ -114,7 +121,7 @@ func clearSession(sid string) error {
return nil
}
func sessionExecture(bar barSend, s *sessionV1) {
func sessionExecute(bar barSend, s *sessionV1) {
switch s.CommandType {
case "cp":
for cps := range doCopyCmdSession(bar, s) {
@@ -183,7 +190,7 @@ func runSessionCmd(ctx *cli.Context) {
if !globalQuietFlag {
bar = newCpBar()
}
sessionExecture(bar, s)
sessionExecute(bar, s)
if !globalQuietFlag {
bar.Finish()
if err := clearSession(sid); err != nil {
+1
View File
@@ -258,6 +258,7 @@ func runSyncCmd(ctx *cli.Context) {
if err := saveSession(s); err != nil {
console.Fatalln(iodine.ToError(err))
}
console.Infoln("\nSession terminated. To resume session type ‘mc session resume " + s.SessionID + "’")
// this os.Exit is needed really to exit in-case of "os.Interrupt"
os.Exit(0)
}