Fixed a bug.

geesefs-0-30-9
Aaron Jacobs 2015-07-24 15:07:55 +10:00
parent 7a5761a67c
commit a1dadab66e
1 changed files with 9 additions and 0 deletions

View File

@ -16,10 +16,13 @@ package fuse
import (
"fmt"
"io"
"log"
"os"
"path"
"runtime"
"sync"
"syscall"
"golang.org/x/net/context"
@ -232,6 +235,12 @@ func (c *Connection) readMessage() (m *buffer.InMessage, err error) {
if err != nil {
c.destroyInMessage(m)
m = nil
// Special case: ENODEV means fuse has hung up.
if pe, ok := err.(*os.PathError); ok && pe.Err == syscall.ENODEV {
err = io.EOF
}
return
}