Commit 12f48f18 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Handle os.LinkError as well.

parent 4d044d88
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"encoding/binary" "encoding/binary"
"os" "os"
"fmt" "fmt"
"log"
"math" "math"
"regexp" "regexp"
"syscall" "syscall"
...@@ -41,7 +42,13 @@ func OsErrorToFuseError(err os.Error) Status { ...@@ -41,7 +42,13 @@ func OsErrorToFuseError(err os.Error) Status {
return OsErrorToFuseError(asPathErr.Error) return OsErrorToFuseError(asPathErr.Error)
} }
asLinkErr, ok := err.(*os.LinkError)
if ok {
return OsErrorToFuseError(asLinkErr.Error)
}
// Should not happen. Should we log an error somewhere? // Should not happen. Should we log an error somewhere?
log.Println("can't convert error type:", err)
return ENOSYS return ENOSYS
} }
return OK return OK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment