From 23d746430688e4905236ef17729e1619f1c63777 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 13 Apr 2016 20:17:02 +0200 Subject: [PATCH] Umount fuse in tests This corrects the order when the fuse mount is terminated by closing the done channel: Before, restic would close the fuse connection and only afterwards try to remove the mount, that does not work. Closes #494 --- src/cmds/restic/cmd_mount.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmds/restic/cmd_mount.go b/src/cmds/restic/cmd_mount.go index 5baf1419a..d800bd33c 100644 --- a/src/cmds/restic/cmd_mount.go +++ b/src/cmds/restic/cmd_mount.go @@ -98,10 +98,10 @@ func (cmd CmdMount) Execute(args []string) error { case err := <-errServe: return err case <-cmd.done: - err := c.Close() + err := systemFuse.Unmount(mountpoint) if err != nil { - cmd.global.Printf("Error closing fuse connection: %s\n", err) + cmd.global.Printf("Error umounting: %s\n", err) } - return systemFuse.Unmount(mountpoint) + return c.Close() } }