Unmount when closing application from cli

This commit is contained in:
Matthieu Rakotojaona 2015-07-19 23:02:02 +02:00
parent eadfcd3f9e
commit e44716381c

View file

@ -72,6 +72,10 @@ func (cmd CmdMount) Execute(args []string) error {
cmd.global.Printf("Now serving %s at %s\n", repo.Backend().Location(), mountpoint) cmd.global.Printf("Now serving %s at %s\n", repo.Backend().Location(), mountpoint)
cmd.global.Printf("Don't forget to umount after quitting!\n") cmd.global.Printf("Don't forget to umount after quitting!\n")
AddCleanupHandler(func() error {
return systemFuse.Unmount(mountpoint)
})
cmd.ready <- struct{}{} cmd.ready <- struct{}{}
err = fs.Serve(c, &root) err = fs.Serve(c, &root)