Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
880bc3f0
Commit
880bc3f0
authored
May 30, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make reflect actually work: use fmt.Sprintf.
parent
90b2a0f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
fuse/fsops.go
fuse/fsops.go
+8
-4
fuse/pathfs.go
fuse/pathfs.go
+4
-2
No files found.
fuse/fsops.go
View file @
880bc3f0
// 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
}
...
...
fuse/pathfs.go
View file @
880bc3f0
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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment