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
96cf2839
Commit
96cf2839
authored
Sep 16, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update autounion.go for new filepath.Walk signature.
parent
5ec71529
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
unionfs/autounion.go
unionfs/autounion.go
+14
-13
No files found.
unionfs/autounion.go
View file @
96cf2839
...
...
@@ -150,15 +150,6 @@ func (me *AutoUnionFs) addFs(name string, roots []string) (code fuse.Status) {
return
me
.
createFs
(
name
,
roots
)
}
// TODO - should hide these methods.
func
(
me
*
AutoUnionFs
)
VisitDir
(
path
string
,
f
*
os
.
FileInfo
)
bool
{
roots
:=
me
.
getRoots
(
path
)
if
roots
!=
nil
{
me
.
addAutomaticFs
(
roots
)
}
return
true
}
func
(
me
*
AutoUnionFs
)
getRoots
(
path
string
)
[]
string
{
ro
:=
filepath
.
Join
(
path
,
_READONLY
)
fi
,
err
:=
os
.
Lstat
(
ro
)
...
...
@@ -171,8 +162,14 @@ func (me *AutoUnionFs) getRoots(path string) []string {
return
nil
}
func
(
me
*
AutoUnionFs
)
VisitFile
(
path
string
,
f
*
os
.
FileInfo
)
{
func
(
me
*
AutoUnionFs
)
visit
(
path
string
,
fi
*
os
.
FileInfo
,
err
os
.
Error
)
os
.
Error
{
if
fi
.
IsDirectory
()
{
roots
:=
me
.
getRoots
(
path
)
if
roots
!=
nil
{
me
.
addAutomaticFs
(
roots
)
}
}
return
nil
}
func
(
me
*
AutoUnionFs
)
updateKnownFses
()
{
...
...
@@ -184,8 +181,12 @@ func (me *AutoUnionFs) updateKnownFses() {
for
_
,
dir
:=
range
directoryEntries
{
if
dir
.
IsDirectory
()
||
dir
.
IsSymlink
()
{
path
:=
filepath
.
Join
(
me
.
root
,
dir
.
Name
)
me
.
VisitDir
(
path
,
nil
)
filepath
.
Walk
(
path
,
me
,
nil
)
dir
,
_
=
os
.
Stat
(
path
)
me
.
visit
(
path
,
dir
,
nil
)
filepath
.
Walk
(
path
,
func
(
path
string
,
fi
*
os
.
FileInfo
,
err
os
.
Error
)
os
.
Error
{
return
me
.
visit
(
path
,
fi
,
err
)
})
}
}
}
...
...
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