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
Kirill Smelkov
go-fuse
Commits
90b39a3b
Commit
90b39a3b
authored
Sep 05, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fake link counts so zipfs tests pass.
parent
58c4a412
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
fuse/fsinode.go
fuse/fsinode.go
+1
-1
fuse/fsmount.go
fuse/fsmount.go
+3
-4
zipfs/zipfs_test.go
zipfs/zipfs_test.go
+0
-1
No files found.
fuse/fsinode.go
View file @
90b39a3b
...
...
@@ -258,7 +258,7 @@ func (me *fsInode) GetAttr(file File, context *Context) (fi *os.FileInfo, code S
fi
,
code
=
me
.
fs
.
GetAttr
(
me
.
GetPath
(),
context
)
}
if
fi
!=
nil
&&
!
fi
.
IsDirectory
()
{
if
fi
!=
nil
&&
!
fi
.
IsDirectory
()
&&
fi
.
Nlink
==
0
{
fi
.
Nlink
=
1
}
return
fi
,
code
...
...
fuse/fsmount.go
View file @
90b39a3b
...
...
@@ -40,21 +40,20 @@ type fileSystemMount struct {
openFiles
HandleMap
}
func
(
me
*
fileSystemMount
)
setOwner
(
attr
*
Attr
)
{
if
me
.
options
.
Owner
!=
nil
{
attr
.
Owner
=
*
me
.
options
.
Owner
}
}
func
(
me
*
fileSystemMount
)
fileInfoToEntry
(
fi
*
os
.
FileInfo
)
(
out
*
EntryOut
)
{
out
=
&
EntryOut
{}
SplitNs
(
me
.
options
.
EntryTimeout
,
&
out
.
EntryValid
,
&
out
.
EntryValidNsec
)
SplitNs
(
me
.
options
.
AttrTimeout
,
&
out
.
AttrValid
,
&
out
.
AttrValidNsec
)
CopyFileInfo
(
fi
,
&
out
.
Attr
)
me
.
setOwner
(
&
out
.
Attr
)
if
!
fi
.
IsDirectory
()
{
fi
.
Nlink
=
1
if
!
fi
.
IsDirectory
()
&&
fi
.
Nlink
==
0
{
out
.
Nlink
=
1
}
return
out
}
...
...
zipfs/zipfs_test.go
View file @
90b39a3b
...
...
@@ -71,7 +71,6 @@ func TestZipFs(t *testing.T) {
}
func
TestLinkCount
(
t
*
testing
.
T
)
{
t
.
Log
(
"TestLinkCount"
)
mp
,
clean
:=
setupZipfs
()
defer
clean
()
...
...
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