mirror of
https://github.com/rclone/rclone.git
synced 2024-12-12 10:12:41 +01:00
f7af730b50
This is using godep to manage the vendor directory.
22 lines
359 B
Go
22 lines
359 B
Go
package fuse
|
|
|
|
import (
|
|
"bytes"
|
|
"errors"
|
|
"os/exec"
|
|
)
|
|
|
|
func unmount(dir string) error {
|
|
cmd := exec.Command("fusermount", "-u", dir)
|
|
output, err := cmd.CombinedOutput()
|
|
if err != nil {
|
|
if len(output) > 0 {
|
|
output = bytes.TrimRight(output, "\n")
|
|
msg := err.Error() + ": " + string(output)
|
|
err = errors.New(msg)
|
|
}
|
|
return err
|
|
}
|
|
return nil
|
|
}
|