aboutsummaryrefslogtreecommitdiffstats
path: root/commands/account/mkdir.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/account/mkdir.go')
-rw-r--r--commands/account/mkdir.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/account/mkdir.go b/commands/account/mkdir.go
index af3d1045..7e49ad8b 100644
--- a/commands/account/mkdir.go
+++ b/commands/account/mkdir.go
@@ -41,13 +41,15 @@ func (m MakeDir) Execute(args []string) error {
if acct == nil {
return errors.New("No account selected")
}
+ previous := acct.SelectedDirectory()
acct.Worker().PostAction(&types.CreateDirectory{
Directory: m.Folder,
}, func(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done:
app.PushStatus("Directory created.", 10*time.Second)
- acct.Directories().Select(m.Folder)
+ history[acct.Name()] = previous
+ acct.Directories().Open(m.Folder, 0, nil)
case *types.Error:
app.PushError(msg.Error.Error())
}