Commit 880bc3f0 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Make reflect actually work: use fmt.Sprintf.

parent 90b2a0f3
// FileSystemConnector's implementation of RawFileSystem
package fuse
// This file contains FileSystemConnector's implementation of
// RawFileSystem
import (
"bytes"
"fmt"
"log"
"reflect"
"strings"
"time"
"github.com/hanwen/go-fuse/raw"
......@@ -13,6 +15,7 @@ import (
var _ = log.Println
func (c *FileSystemConnector) String() string {
if c.rootNode == nil || c.rootNode.mount == nil {
return "go-fuse:unmounted"
......@@ -21,7 +24,8 @@ func (c *FileSystemConnector) String() string {
fs := c.rootNode.mount.fs
name := fs.String()
if name == "DefaultNodeFileSystem" {
name = reflect.TypeOf(fs).Name()
name = fmt.Sprintf("%T", fs)
name = strings.TrimLeft(name, "*")
}
return name
}
......
package fuse
import (
"fmt"
"log"
"path/filepath"
"reflect"
"strings"
"sync"
)
......@@ -90,7 +91,8 @@ func (fs *PathNodeFs) OnUnmount() {
func (fs *PathNodeFs) String() string {
name := fs.fs.String()
if name == "DefaultFileSystem" {
name = reflect.TypeOf(fs.fs).Name()
name = fmt.Sprintf("%T", fs.fs)
name = strings.TrimLeft(name, "*")
}
return name
}
......
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